• I want to put my most recent posts to display on my main page with the most recent on top.

    I searched and found that I need to put “DESC” in a certain file, but I’m not sure which .php file to put it into.

    I looked at the main page file and I can’t find the place that matches this instruction.

    How do I do this and which file is it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • What you want to do is the default (should already be in place) in 98% of themes. If you are using a current theme that has lots of user defineable settings, check the theme options panel to see if it gives you access to sort order. Without that, you most likely need to change index.php (in most themes) but you will have to add a query_posts statement, or, quite possibly, there will already be a query posts statement that contains sort ASC, since DESC is the default. In that case, change ASC to DESC.

    If you can’t find any of this, post a URL and post the theme name you are using.

    Thread Starter rmo120

    (@rmo120)

    I’m using Graph Paper Press’ Monochrome Lite https://graphpaperpress.com/

    I’m not that well versed in php just FYI….

    I found the <?php query_posts(‘showposts=1’); ?>
    but it doesn’t seem to show ASC or DESC

    Do I just add code around this line? What do I put?

    Hi

    that may not be the correct place as showposts=1 means show 1 post. Is there a section in the theme that highlights one post? If so that code would be related to that section.

    If you want to experiment, change the line from this
    <?php query_posts('showposts=1'); ?>
    to this
    <?php query_posts('showposts=5&order=DESC'); ?>
    which will show 5 posts in descending order.

    If the line of code is for another place on the site, however, it may break that section. You can always set it back to the way it was before though.

    Thread Starter rmo120

    (@rmo120)

    Cool…That seems to have worked! Thanks a lot!

    Thanks for help on the other topic also. I’m trying to solve a few problems… another is how to put custom avatars so the users can choose one for their posts. ie: putting the characters that are on that site as avatars. Do you know how I could do that? Is that a plug-in?

    https://www.tobynfriendz.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘RECENT posts on top for main page?’ is closed to new replies.