- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi!
I’m using Chris’ code from the #65 screencast on Custom fields. I have a page of products listed with info being pulled from custom fields. But I can’t figure out how to paginate the list, i.e. limit the list to 10 products, then go to another page. I’d appreciate any thoughts! Is this even possible since it’s a page?
Here’s the code:
the_post();
$thumbPath = get_post_meta($post->ID, ‘thumbnail’, true);
if ($thumbPath ==”) {
$thumbPath = ‘/images/comingsoon.png’;
}
?>
ID, ‘description’, true); ?>
This plugin works LITERALLY ANYWHERE
http://wordpress.org/extend/plugins/wp-pagenavi/installation/
I used it on a query loop and it works!
By default running query_posts will completely overwrite all existing query variables on the current page. Pagination, categories, dates etc. will be lost and only the variables you pass into query_posts will be used.
Try something like the following:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts($paged . "&posts_per_page=5&orderby=title&order=ASC&paged=$paged");
?>
Change the arguments as needed.