WordPress.org

Forums

CPT-onomies: Using Custom Post Types as Taxonomies
[resolved] Pagination on CPT-onomie archive is not working (3 posts)

  1. martijnn94
    Member
    Posted 1 year ago #

    Hi,

    I have set up an CPT-onomie and everything is working fine except for 1 thing. The archive page pagination is not working properly and I hoped you can help me out here as I have tried like everything to get this to work.

    As the archive page slug i'm using $post_type/team/$term_slug, however I tried alot of other variations on this without result. The first archive page works like a charm. But /team/team/wieldrecht1/page/2/ gives me a 404 and I have no idea how to fix this. So I hoped you could help me out here!

    Regards,

    http://wordpress.org/plugins/cpt-onomies/

  2. zenguerrilla
    Member
    Posted 1 year ago #

    Hi there,
    I had the same problem. The fix is simple:

    in manager.php, replace line 868 (for version 1.3.1):
    add_rewrite_rule( '^' . $cpt_onomy_archive_slug . '/?', 'index.php?'.$taxonomy . '=$matches[1]&cpt_onomy_archive=1', 'top' );

    with:

    add_rewrite_rule( '^' . $cpt_onomy_archive_slug . '/page/([0-9]+)?', 'index.php?'.$taxonomy . '=$matches[1]&paged=$matches[2]&cpt_onomy_archive=1', 'top' );
    add_rewrite_rule( '^' . $cpt_onomy_archive_slug . '/?', 'index.php?'.$taxonomy . '=$matches[1]&cpt_onomy_archive=1', 'top' );

    it adds an extra rewrite rule for pagination.

  3. Rachel Carden
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks zenguerrilla for helping martijnn94 out!

    I've got all this fixed for the next update and I've posted the fix on the forum for the meantime.

    http://wordpress.org/support/topic/fix-for-cpt-onomy-feeds-and-pagination

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.