Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I´m trying to display the older post first in wordpress:

i´m using this code to get the list of post of the current category:

<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>

if i change "&order=desc&" to "&order=ASC&" it just still the order in the same way. what i´m doing wrong here?

share|improve this question
stackoverflow.com/questions/13084736/display-older-post-first Exact Duplicate from SO – Brady Oct 26 '12 at 10:51

closed as too localized by Brady Oct 26 '12 at 10:51

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.