5

wordpressで最初に古い投稿を表示しようとしています:

このコードを使用して、現在のカテゴリの投稿のリストを取得しています。

<ul id="submenu_productos" class="clearfix">
    <?php
        $IDOutsideLoop = $post->ID;
        while( have_posts() ) {
            the_post();
            foreach( ( get_the_category() ) as $category )
                $my_query = new WP_Query('category_name=' . $category->category_nicename . '&orderby=date&order=desc&showposts=100');
            if( $my_query ) {
                while ( $my_query->have_posts() ) {
                    $my_query->the_post(); ?>
            <li<?php print ( is_single() && $IDOutsideLoop == $post->ID ) ? ' class="test"' : ''; ?>>
                <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> |
            </li>
    <?php
            }
        }
    }
    ?>
</ul>

に変更"&order=desc&""&order=ASC&"ても、順序は同じです。私がここで間違っているのは何ですか?

4

1 に答える 1

4

投稿タイプの順序プラグインを使用していますか? これには、順序付けをオーバーライドする設定があります (自動ソート順序付けオプション)。

于 2012-10-26T10:30:28.130 に答える