Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    Do you use the rewrite argument when you register the custom post type?
    https://codex.www.ads-software.com/Function_Reference/register_post_type
    Do you have a Page (post_type) with the same slug as /xxx ?
    Do you have a query on the loop of your custom post type archive?
    https://codex.www.ads-software.com/Template_Hierarchy#Custom_Post_Types_display

    a lot of questions, I know ??

    Have you tried:

    – reading the troubleshooting 3.4 master list to see if any of your problems is listed there: https://www.ads-software.com/support/topic/troubleshooting-wordpress-34-master-list

    – flushing any caching plugins you might be running, as well as server and/or browser caches.

    – deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems.

    – re-uploading all files & folders – except the wp-content folder from a fresh download of WordPress. by using FTP or whatever file management application your host provides.

    – re-running the upgrade via wp-admin/upgrade.php

    Thread Starter pnaj

    (@pnaj)

    Wow, keesiemeijer, thank you very much for your detailed answer.

    I will go through each suggestion and come back when I’m done.

    Moderator keesiemeijer

    (@keesiemeijer)

    But, if I go to https://www.xxx.com/yyy/?page=2 I get redirected to https://www.xxx.com/yyy/2/

    Strange, I just tried this on my website and it doesn’t rewrite it at all. When I use yyy/?paged=2 it redirects correctly to yyy/page/2/.

    Thread Starter pnaj

    (@pnaj)

    Hi again,

    For me, before 3.4.1, https://www.xxx.com/yyy/?page=2 didn’t get re-directed at all, and displayed the correct posts.

    Quick answers to your questions, though …

    Do you use the rewrite argument when you register the custom post type? Not for the two post-types that are having problems.

    Do you have a Page (post_type) with the same slug as /xxx ? No.

    Do you have a query on the loop of your custom post type archive? Yes. I could post the code if you thought it’d help.

    Cheers,
    Paul.

    Moderator keesiemeijer

    (@keesiemeijer)

    I could post the code if you thought it’d help.

    Yes it would ??

    Can you paste and submit the full code of with the query in it into a pastebin.com and post the link to it here? see the Forum Rules for posting code and using the pastebin.

    For me, before 3.4.1, https://www.xxx.com/yyy/?page=2 didn’t get re-directed at all, and displayed the correct posts.

    But You do have pretty permalinks if your permalink structure is /%post_id%/%postname%/.
    https://codex.www.ads-software.com/Using_Permalinks

    Thread Starter pnaj

    (@pnaj)

    But You do have pretty permalinks if your permalink structure is /%post_id%/%postname%/.

    Ah, I see what you mean. I thought you were referring to the ‘rewrite’ => array(‘slug’ => ‘yyy’) option of register_post_type().

    I’v tried to pare down the code to just what I think’s relevant …
    https://pastebin.com/bwjbG0k0

    Thanks again,
    Paul.

    Moderator keesiemeijer

    (@keesiemeijer)

    Very good pastebin!

    Your theme uses a custom page template for your custom post type archives. Maybe this is because the archive feature for custom post types was introduced later and themes wanted this functionality. Are you on the latest version of your theme?

    It also does all the pagination by itself and doesn’t use the normal pagination functions used by WordPress.

    What I would recommend is to create a custom post type archive template for the tte_blog_entry post type. With a normal loop (no query). With native pagination functions like:
    https://codex.www.ads-software.com/Function_Reference/next_posts_link
    https://codex.www.ads-software.com/Template_Tags/previous_posts_link
    Or with a plugin: https://www.ads-software.com/extend/plugins/wp-pagenavi/

    I’m sorry, this is probably not what you wanted to hear.

    Thread Starter pnaj

    (@pnaj)

    I’m sorry, this is probably not what you wanted to hear.

    You are right there! ??

    To be honest, I built this site some time ago and I can’t remember why I didn’t use the native loop. Will try that next.

    Thanks very much for your time today, I really appreciate it. And if I find a solution, I’ll post back.

    Cheers,
    Paul

    Thread Starter pnaj

    (@pnaj)

    Wow, have found an amazingly simple solution. In my custom pagination, I’m using ‘page’ as the GET var (as in ?page=2, etc). That word (page) seems to be the problem.

    On my test site, I changed ‘page’ to ‘pp’ and … the pagination works perfectly.

    Big thanks to keesiemeijer – your comment about ‘paged’ working as expected made me think of changing the GET var.

    Phew!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Redirected pagination after upgrade to 3.4.1’ is closed to new replies.