• One developer unknown by me had left us with a pagination function that paginate the tags page publishing more pages than the needs, i think it paginate like every tag has all posts listed, so from a certain page every new page is a 404 error.
    This is the code we have, i’ve tried to put a $tag variable without success:

    
    global $wp_query;
    $paged  = get_query_var('paged') ? get_query_var('paged') : 1;
    $cat    = get_query_var('cat') ? get_query_var('cat') : '';
    $tag    = get_query_var('tag') ? get_query_var('tag') : ''; // my test for tag variable
    
    $args = array(
    	  'paged' => $paged
    	, 'order' => 'desc'
    	, 'orderby' => 'date'
    	, 'type' => 'post'
    	, 'cat' => $cat
    	, 'tag' => $tag
    	, 'post_status' => array('publish')
    	);
    $the_query = new WP_Query( $args );
    
    // here goes the WHILE LOOP
    
    wp_pagenavi( array( 'query'=> $the_query));
    
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to paginate Tag’s page’ is closed to new replies.