• I am using wordpress theme twenty ten. I wanted to sort my posts in ascending order so I did a search through this forum. I found my answer and am using this code..
    <?php query_posts(‘order=ASC’); ?>
    in the index.php file

    I thought everything worked great, until I noticed that when you select the link to older posts (which should say newer posts) at the top or the bottom of the page you aren’t brought to older posts(or newer posts). It just brings up the same pages.

    website is http://www.expecting-twins.com

    Any help would be greatly appreciated.
    Thamnks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Don’t edit the Twenty Ten theme. Your changes will be over-written the next time you upgrade WordPress. For this reason, it is recommended that you consider creating a child theme for your customisations. Once your child theme is active, we should be able to help with the customisation.

    Thread Starter RyLoree

    (@ryloree)

    Thanks,

    I’ll let you know when I’m done.

    Thread Starter RyLoree

    (@ryloree)

    I have created a child theme for the twentyten theme. How do I update the index.php file in my child theme?

    http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note

    the example is exactly what you are looking for.

    Try adding:

    global $query_string;
    query_posts( $query_string . '&order=ASC' );

    just before get_template_part( 'loop', 'index' ); in your child’s index.php template file.

    Thread Starter RyLoree

    (@ryloree)

    Thanks,
    works great.. just one more thing..
    Can I change the older posts link to say newer posts?

    Pretty sure you can’t do that without creating your own child loop-index.php.

    just change the wording?

    follow @esmi’s suggestion; copy loop.php from the parent them into the child theme; edit it there;
    find one section near the beginning:

    <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>

    same again near the end.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Trouble with viewing older posts’ is closed to new replies.