Skip to content

Commit

Permalink
Don't show taxonomy stats when using Infinite Scroll. Fixes #110
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Aug 21, 2014
1 parent 8072323 commit 2303140
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/template-tags.php
Expand Up @@ -617,6 +617,11 @@ function independent_publisher_search_stats() {
* Returns taxonomy archive stats and current page info for use in taxonomy archive descriptions
*/
function independent_publisher_taxonomy_archive_stats( $taxonomy = 'category' ) {

// There's no point in showing page numbers of we're using JetPack's Infinite Scroll module
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' ) )
return '';

global $wp_query;
$total = $wp_query->found_posts;
$total_pages = $wp_query->max_num_pages; // The total number of pages
Expand Down

0 comments on commit 2303140

Please sign in to comment.