ewdicus
Forum Replies Created
-
Forum: Plugins
In reply to: Trying to display most recent single post, with paginationThank you again for the help. I haven’t had time to try this yet but I’ll post when I do.
In my opinion, something like this needs to be common information. I’ve seen other people post this problem, but there is either no solution posted or one that doesn’t work for me. If I can get this to work, I’ll try to distill the process to something manageable and slap it into the codex.
Thanks again,
ElliottForum: Plugins
In reply to: Trying to display most recent single post, with paginationOkay, I looked at what you wrote again.
No, I’m not trying to redirect to a different page to handle the rest of the posts. I’m trying to do it all on the index. Is this wrong?
Thanks
Forum: Plugins
In reply to: Trying to display most recent single post, with paginationI’m not sure what you’re asking. All the code I’ve posted is from the top of my index.php page.
I just want it to always show one post, with previous and next buttons to navigate through posts. I know it would do this if I set the reading options to “show at most 1 post” but that would affect the whole site, which I do not want.
Thanks for the replies,
ElliottForum: Plugins
In reply to: Trying to display most recent single post, with paginationOkay, I’ve narrowed this down.
My blog is still in testing so I only have 3 posts. In the “reading” settings I have “Show at most 10 posts”. I think what’s happening is this:
WordPress is getting a request for page/2 when it thinks that all the posts should fit on one page – so, it’s giving a 404.
If I change to “Show at most 2 posts”. It works…until you try to view the 3rd post. So, wordpress expects “page/2” now, but not “page/3” and it gives a 404.
So what is the solution here? It’s like I need to catch it before it looks to see if there should be a “page/whatever” and decide, based on the number of posts, what to show.
Thanks again,
ElliottForum: Plugins
In reply to: Trying to display most recent single post, with paginationI took a further look at the “Example 3” you referenced, and explicitly used it. It also causes the pagination problem. I’ve tried so many “solutions” I don’t know what to try next. If anyone thinks it’ll help, I’ll post my whole index.php
Thanks,
ElliottForum: Plugins
In reply to: Trying to display most recent single post, with paginationThanks for the reply!
If that has any effect I’m not seeing it. I’m now using this:
<?php if (is_home()) { $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("posts_per_page=1&paged=$page"); } ?>And as you can see, I’m still getting broken links. Any other ideas?
Thanks again.