• I’d like to modify the default Recent Posts widget so the post titles are displayed in ascending sequence.

    I found the function WP_Widget_Recent_Posts in the default-widgets.php file and I inserted the following code:

    <?php query_posts($query_string . '&orderby=date&order=ASC'); ?>

    Immediately before the loop code:

    <?php while ($r->have_posts()) : $r->the_post(); ?>

    Unfortunately (even though it looks like the_post is reset in the function, the order of the widget remained in DESC sequence. But the order of the main post loop changed to ASC which is not what I want.

    Any ideas what I need to do to just change the order in the default widget?

  • The topic ‘Widget : Default Recent Posts – change order’ is closed to new replies.