This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Category and Tags ‘page 2’ not working

Resolved 10 replies premiumthemetheme-vantage
11 years ago · Last reply by Andrew Misplon 11 years ago

Hello,

I have a small problem. On my tags/category archive pages, selecting ‘page 2’ or ‘page 3’ or ‘next’ just defaults back to the first page.

I’m sure this is probably a quick fix but I’m not sure what’s going on…

An example page is: http://test.naturespy.org/tag/yorkshire-pine-marten-project/

Thanks,

James

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

10
  1. Andrew Misplon Staff 11 years, 9 months ago

    Hi James

    Please head to Dashboard > Updates, update everything there.
    Head to Settings > Permalinks, hit save.
    Try temporarily disabling all plugins except for Page Builder and see if the issue resolves. If it does, enable plugins one at a time while checking the problem.

    No luck with all of the above? Please can you reduce the posts displayed on a page so I can see the problem in action at the link you sent.

  2. Nature Spy 11 years, 9 months ago

    Hi Andrew,

    Tried the first two suggestions, and no change.

    Changed it back so you can see the page I posted properly. It is only happening on the tag pages, not on the category pages.

    I’m concerned about disabling widgets as they’re used a lot across the site and I don’t want to have to do them again – will everything go back to normal if I disable and re-enable them?

    Thanks again for your help,

    James

  3. Nature Spy 11 years, 9 months ago

    Just to add – page 2 does work, but only when you enter the URL in the address bar; its the button itself that doesnt seem to be working (both ‘2’ and ‘Next’)

    Thanks again,

  4. Andrew Misplon Staff 11 years, 9 months ago

    Thanks for reporting this James. There is a second forward slash being added to the url of those buttons. It’s a bug. We’ll have it fixed in the next update of Vantage. Apologies for the hassle. Please re-test the next time you update.

  5. Nature Spy 11 years, 9 months ago

    Not a problem, thanks for getting back so quick – is there any way for me to make the edit in the appropriate php file for now?

    I can see which one it would be…

  6. Andrew Misplon Staff 11 years, 9 months ago

    In wp-content/themes/vantage/inc/template-tags.php swap out line 378 onwards with the below:

    if( !function_exists( 'vantage_pagination' ) ) :
    /**
     * Display the pagination
     *
     * @param string $pages
     * @param int $range
     */
    function vantage_pagination($pages = '', $range = 2) {
    	$showitems = ($range * 2)+1;
    	global $wp_query, $wp_rewrite;
    	$paged = $wp_query->get('paged');
    	if(empty($paged)) $paged = 1;
    	if($pages == '') {
    		global $wp_query;
    		$pages = $wp_query->max_num_pages;
    		if(!$pages) $pages = 1;
    	}
    	if(1 != $pages) {
    		$format_permalink = substr( get_pagenum_link(false), -1, 1 ) == '/' ? 'page/%#%/' : '/page/%#%/';
    		$format_query_string = strpos(get_pagenum_link(false), '?') === false ? '?paged=%#%' : '&paged=%#%';
    		echo "<div class='pagination'>";
    		echo paginate_links( array(
    			'total' => $pages,
    			'current' => $paged,
    			'mid_size' => $showitems,
    			'format' => ( $wp_rewrite->permalink_structure == '' || is_search() ) ? $format_query_string : $format_permalink,
    			'base' => get_pagenum_link(false).'%_%',
    		) );
    		echo "</div>\n";
    	}
    }
    endif;
  7. Nature Spy 11 years, 9 months ago

    Hi Andrew,

    I appreciate that – but unfortunately it made the website stop working, so I’ve had to revert to the backup. Not sure why, but tried it a few times.

    If it helps you guys fix the bug, the error is the slash on line 405, in front of the last ‘page’ on that line.

    Thanks again for your help – wouldn’t have known where to look without your support.

    Best theme, best support!

    James

  8. Andrew Misplon Staff 11 years, 9 months ago

    Sorry about that.

    It sounds like you’ve resolved the issue. In case I mis-understood please replace template-tags.php with my copy here: https://dl.dropboxusercontent.com/u/3072682/template-tags.php.

    Thanks again for pointing this out.

  9. Nature Spy 11 years, 9 months ago

    Please, no need to apologise; wouldn’t have figured it out without your help.

    Yes, resolved and thanks again.

  10. Andrew Misplon Staff 11 years, 9 months ago

    Super, glad we could help here. All the best with your project.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread