hello,
I am using query_post to get posts and below the post list I am showing the next and previous post links.
But those links are not working - I am always getting the same result from query_post - even if I give the $query_string as parameter.
how I can show on a page selected posts and the navigation through is working?
Edouard Duplessis
Member
Posted 1 year ago #
http://codex.wordpress.org/Function_Reference/query_posts#Pagination_Parameters
Pagination Parameters
- nopaging=true - will disable pagination, displaying all posts
- posts_per_page=10 - number of posts to show per page
- paged=2 - show the posts that would normally show up just on page 2 when using the "Older Entries" link. You should set this to get_query_var( 'paged' ) if you want your query to work with pagination.
- order=ASC - show posts in chronological order, DESC to show in reverse order (the default)
ok, I found it too and it is working, but on my single posts the links are no links only text.
see: http://wp-theme-t1.it-gnoth.de/2010/07/21/test-artikel-for-delman/
Edouard Duplessis
Member
Posted 1 year ago #
did you put the previous and next link inside the custom query??
Because you have too...
<?php
$myloops = new Wp_query();
if($myloops->have_posts()){
while($myloops->have_posts(){
$myloops->the_post();
}
posts_nav_link();
}
?>
it is just a single.php - it happens with all single post views. no idea at the moment.
ok I solved the problem - thanks for the help
bondjack
Member
Posted 1 year ago #
Christian, now did you solve this? Please share your code, thx