[Support request] Pagination Issue

Home Forums Support Pagination Issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1490283
    Mohamed

    Hi,

    I’m using a custom post type “mobiles” and taxonomy “brands” with this code for rewrite the URLs

     add_filter( 'init', 'the_rewrite_orocess' );
    function the_rewrite_orocess( $vars ){
    /* custom post type */
     add_rewrite_rule('mobiles/([^/]+)-phones/?$',
       'index.php?post_type=mobiles&orderBy=$matches[1]',
       'top');
      add_rewrite_rule('mobiles/([^/]+)-phones/page/([0-9]+)?$',
       'index.php?post_type=mobiles&orderBy=$matches[1]&paged=$matches[2]',
       'top');
    
    /* Taxonomy */
       add_rewrite_rule('^brand/([^/]*)/([^/]*)?',
       'index.php?brands=$matches[1]&orderBy=$matches[2]',
       'top' ); 
       add_rewrite_rule('^brand/([^/]+)/page/([0-9]+)?$',
       'index.php?brands=$matches[1]&paged=$matches[2]',
       'top' ); 
       add_rewrite_rule('^brand/([^/]*)/([^/]*)/page/([0-9]+)?$',
       'index.php?brands=$matches[1]&orderBy=$matches[2]&paged=$matches[3]',
       'top' ); 
    
         flush_rewrite_rules();
    }

    but the pagination return the page 2 loop content but the active is the button number “1” !!
    Although it works in the archive of custom post pages
    Could you check?

    #1491099
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I’m afraid I’m not familiar enough with rewrite rules to spot the issue here.

    This would be a good place to ask this question: https://wordpress.stackexchange.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.