WordPress.org

Ready to get started?Download WordPress

Forums

Number of posts per page (9 posts)

  1. stephaniemull
    Member
    Posted 3 years ago #

    OK, I have checked in the forums, and most posts about this seem to be very old.
    http://locatingunlimited.com/accidents/

    I can't get it to show more than one entry in its full format.
    I have tried 3 themes and the same thing happens.

    I have varied the number of posts in the Settings/Reading panel. It says "show at most" - I need a "show at least"!

    I have looked at my index.php and been able to get rid of the "previously" posts via changing the admin reading variable, due to this code:
    $wp_query->post_count > 1
    I think.

    .. but I don't get how to show my last "x" amount of posts in full format....?

    I appreciate any help.
    Thank you.

  2. beingzoe
    Member
    Posted 3 years ago #

    That seems very odd. If you have set your Settings > Read "show at most" to something larger then it should be showing it. If it were only only happening on one theme then I would say it is definitely the theme. But if it is really happening on different themes perhaps you have a plugin installed that is doing that?

    Otherwise make sure to check index.php, any archive (e.g. archive.php, category.php, etc...), whatever template you are using for the accidents page to output the blog posts, and loop.php if you have one.

    You are looking for query_posts() or anything to do with the $wp_query object you were already messing with as well as whatever code is formatting the "previously" list. Search for postlist. That is the class being applied to that list. Find that and you can trace back your problem.

    Once you find it you'll probably be able to see how the loop output is being limited/usurped to build the previously list and make the necessary adjustments.

    Sorry I couldn't offer a more simple easy solution but that is how I would troubleshoot it.

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    can you paste the theme's index.php into a http://wordpress.pastebin.com/ and post the lnk to it here?

    I have tried 3 themes and the same thing happens.

    very odd

    have you tried to switch to the Twenty Ten theme to check for theme related issues?

  4. stephaniemull
    Member
    Posted 3 years ago #

    http://wordpress.pastebin.com/a5ZJyt7T

    OK, I swear when I tested twenty10 this a.m., it did the same thing, but now it is not, I must have had the admin setting to one this morning.

    I just tried it on 2 themes - 2010 and another and it works fine.

    so, it must be the 'previous' thing....I have been trying to debug it... but any help would be appreciated. It somehow defaults to doing the "previous" thing instead of doing full posts.....

    THANK YOU!

  5. beingzoe
    Member
    Posted 3 years ago #

    I edited that snippet at pastebin with a solution that still uses the "previously" feature.

    http://wordpress.pastebin.com/xfYRFdrw

    You will also see a note towards the end of the file explaining how you could get rid of that feature altogether and just show all the posts in the loop normally. However I wouldn't recommend doing this unless I saw the rest of the theme templates. It is unclear if this page is also displaying single posts as well and if it is even the solution using previously will cause problems.

    At any rate that should help get you closer to what you are looking for. All my additions are commented with // added by zoe

  6. stephaniemull
    Member
    Posted 3 years ago #

    Thank you so much for your time.
    OK, I keep getting a parse error and have been trying to debug it myself, but must be dull today.
    } // END counter condition for how many posts to show "content" for - added by zoe
    Creates a parse error - unexpected '};'

    I have tried several things, but am stuck again.

    I took out the IF statement like you said, and took out the check, and I still get one post

    I also looked at the 2010 to see if I could figure out where they pull the number of posts to show on a page, and haven't figured that out, either.....

    Yikes, I think I am making this harder...I have to leave now and will look at it later.....but if you see the glaring mistake, great!

  7. beingzoe
    Member
    Posted 3 years ago #

    You know what I'm sorry I see what I did. I was in a hurry on my way out the door and I oversimplified what is going on there. That will work but it actually needs another loop to do what I thought it was already doing. But I don't have time to do that today. I'll revise and send it again if someone else hasn't helped you by then.

    I'm sorry but a bunch of stuff came up.

  8. beingzoe
    Member
    Posted 3 years ago #

    It looks like you might have worked that out? Are you all set now? Or do you still need help?

    My apologies for the sloppy fix I sent you. Fairly reckless of me, but I tend to be a cowboy like that. Best of luck.

  9. stephaniemull
    Member
    Posted 3 years ago #

    Thanks for your help, much appreciated.
    You put me in the right direction.... I'm still debugging, but have the right idea.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic