WordPress.org

Ready to get started?Download WordPress

Forums

Index page is only displaying posts from current day (5 posts)

  1. zarastudios
    Member
    Posted 8 years ago #

    Hi. My index page is only displaying posts from the current day, with a link to previous entries. It didn't start doing this until I modified wordpress to display posts within a category alphabetically by title. Would that affect how posts are displayed on the index page? Thanks in advance for your help.

  2. Marc
    Member
    Posted 8 years ago #

    Look under admin >> options >> reading to ensure you have more than one post displayed in the setting at the top of the page.

  3. Lorelle
    Member
    Posted 8 years ago #

    >>>It didn't start doing this until I modified wordpress to display posts within a category alphabetically by title.<<<

    If you made the change in your index.php, then yep. This could be the problem since you told it do list these by title.

  4. zarastudios
    Member
    Posted 8 years ago #

    Hi. I did double-check to see how many posts were supposed to be displayed on the index page and it still says 5. All I have done differently is to add this to wp-includes/classes.php on line 462.


    // Alphabetical hack for categories
    if ($whichcat)
    {
    $q['orderby'] = 'title';
    $q['order'] = 'ASC';
    }


    I would expect the posts on the index page to appear in alphabetical order, if anything changed, but now index.php only displays the posts for the current day.

  5. zarastudios
    Member
    Posted 8 years ago #

    Well, I found out it wasn't the alphabetical category hack. I removed it and I'm still having the same problem. The index page is still just displaying one post per page. Is there a way to manually edit the code so that I can make sure it displays 5 posts? I thought about using <?php get_archives('postbypost', '10'); ?>. This would work fine if I could get the posts to display from just one category. Is that possible?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.