Hi, this has been asked before on WP forums, but none of the solutions worked for me, I've reset the permalinks, etc. to no avail. I hope you guys have the answer. This is my setup:
I have a custom post type called ted_venue, and two templates, single-ted_venue.php (single venue details) and page-venues.php (for displaying a list of venues). Permalink structure is site.com/venues/venue-slug for venue detail and site.com/venues for venues list.
This is the pagination code on list of venues:
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$wp_query = new WP_Query(array('post_type' => 'ted_venue',
'paged' => $paged,
'posts_per_page' => 30)
);
if ($wp_query->have_posts()):
?>
<ul>
<?php while ($wp_query->have_posts()): $wp_query->the_post(); ?>
...
Then at the bottom I add a few pagination links. If I go to site.com/venues/page/2 it brings a 404 error.
Then, if I reset permalinks to default and then to current, venue-list pagination works OK but single venue detail doesn't. So, basically when pagination works single venue doesn't and viceversa.
Does anyone have a clue on what may be happening or at least can you point me to an article or live working example?
Thanks!