I am working on a website where I have a blog but I also have a custom post type to allow me to drop in some videos.
I would like to use pagination so that if there are more then 9 videos displayed, then pagination occurs.
The first part of this works. The videos are indeed limited to 9 per page and the pagination correctly shows up at the bottom.
However when I click on the link for the second page, even though the URL changes, the first pages videos are displayed.
For my 'normal' blog posts, pagination is working exactly as intended.
This is the current code that I am using for my custom post type:
<?php if ( have_posts() ) : ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('post_type=videos&posts_per_page=9&paged=$paged'); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
Any help would be greatly appreciated.