Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 999519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:22:01+00:00 2026-05-16T07:22:01+00:00

this has been asked before on WP forums, but none of the solutions worked

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:22:02+00:00Added an answer on May 16, 2026 at 7:22 am

    Ok, here’s why it’s not working:

    You’re pulling in ‘paged’ while WordPress still thinks that it’s on a static page, therefore paged will always be 1. Unfortunately, there’s no way to do what you want to do the way you’re doing it right now, but there are other solutions.

    There are basically two ways to fix this: First, you could override the rewrite rules your post type is generating yourself (this is the best way, but also the most complicated, and would involve days of work just figuring out how the rewrite engine really works). The second way (the easy way that also happens to work perfectly but just isn’t necessarily the best way) is to use Matt Wiebe’s ‘Smarter Custom Post Types’ code found here:

    http://somadesign.ca/projects/smarter-custom-post-types/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This has been asked before (question no. 308581) , but that particular question and
I'm sure this has been asked before, but I can't find it. What are
It's quite possible a question like this has been asked before, but I can't
This question has been asked before ( link ) but I have slightly different
I know this question has been asked before, but I ran into a problem.
I know this specific question has been asked before , but I am not
I know this question has been asked a bit before. But looking around I
I know that this question has been asked before, but I'm looking for a
This question has problably been asked before, but it seems like I can't phrase
This has been asked before but I can't find a definitive answer, in code.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.