WordPress.org

Ready to get started?Download WordPress

Forums

Pagination fails with custom post type (404) (2 posts)

  1. JohnC28
    Member
    Posted 3 years ago #

    I know this has been talked about in many threads (I think I've read them all!), but please bear with me...

    Basically, I can get beyond page 1 of a list of custom post types.

    The reason boils down to a problem on line 2210 of query.php.

    If change this:
    $where .= " AND ($wpdb->posts.post_type = 'post')";
    to this
    $where .= " AND ($wpdb->posts.post_type = 'post') OR ($wpdb->posts.post_type = 'MY_CUSTOM_POST_TYPE')";
    I don't get the 404.

    Clearly, I'm not supposed to do that. So what do I change?

    It should be said that, even though I don't get the 404, I still only get page 1 - not the actual page in the url.

    It must be some rewrite problem, but I don't know what.....

    All/any help very much appreciate.

    Regards

    John

  2. JohnC28
    Member
    Posted 3 years ago #

    UPDATE

    If I add ?post_type=MY_CUSTOM_POST_TYPE onto the URL, the pagination words....but only for the first 4 or 5 pages (and there are lots more pages).

    Ideas anyone?

    Thanks

    John

Topic Closed

This topic has been closed to new replies.

About this Topic