Thread Starter
Chris_K
(@handysolo)
Actually, let me amend my goal a bit to simplify:
What I’d really like to do is figure out how to show my 7 articles in the main loop (which excludes my asides category).
I think you’re looking for the “query_post” function..
http://codex.wordpress.org/Template_Tags/query_posts
What you should do is call
query_post("cat=-<asides cat>");
This way, your home page will show all the posts not in the asides cat, you can leave your asides code as it is and in your Options, just set the home page to show 7 posts.
Regards
Thread Starter
Chris_K
(@handysolo)
Thanks for the reply.
That approach managed to get my 7 on the page, true, but it also ensured that I’d get nothing in the asides sidebar bit.
It would appear that the example (link in my original post) uses rewind on the same loop for both the main post list and the aside list.
I’ve experimented a bit with using multiple loops. One loop excluding the aside cat and the other loop only including that category. However, for some reason, doing that ensures that my next_page / prev_page navigation goes all to heck. They all result in the same as the main page.
I’ve looked at the codex page for asides but would like to see a demo – what is your site, HandySolo?
Also, I’ve looked for next_page
and previous_page
on http://codex.wordpress.org/Template_Tags but did not see them – did you mean next_post
and previous_post
?
I am trying to implement page navigation, which may be similar to this issue.
I want to enable paging through ‘x’ number of posts while displaying ‘y’ at a time.
To do this, I think I need to use some kind of session/state variable so I can display a nav link like next 5 posts and previous 5 posts.
The goal is to have these links display (in the main page)
5 posts at a time in sequential order without losing track of which posts are currently displayed, thus allowing forward and backward browsing 5 posts at a time.
Any idea how to do this?
Thread Starter
Chris_K
(@handysolo)
Deko – just click my name to the left for a link to my site.
Next_page / previous_page have apparently been deprecated, but still work. There are better options now though (think I replied to your other thread yesterday with them). For instance, the Default theme uses:
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries »') ?>
</div>
Page navigation is built in using the tags mentioned. I have no clue how to do the counting part of your question though.