The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Query Multiple Taxonomies
found_posts count is wrong if its paginated (4 posts)

  1. Unsal Korkmaz
    Posted 3 years ago #

    I didnt check codes for what is wrong. but there is a live example:

    This page using 2 tax filter;
    * 1 "marka" taxonomy as "bioderma"
    * 1 "konu" taxonomy as "temizleyici-urunler"

    $wp_query->found_posts result is 29 but plugin shows 15 because system pagination is 15.

    using 1.6.2 version

  2. dannyjimmy
    Posted 3 years ago #

    I am experiencing the same issue:


    there are 23 posts, but the count for the "podcast" tag is showing up as 3 on page 3, (pages 1 and 2 it's each 10, because the count is 10, and then 3 is the remainder on page 3)

    Let me know if a fix is upcoming for this. If there's not one, perhaps I'll poke around to try and figure out why. Finding and fixing the issue would be my most impressive code-related feat so far, but hey, why not? :-) Because this will definitely confuse my visitors trying to understand and use the widget.

    Thanks for a sweet plugin,

  3. atti_simon
    Posted 3 years ago #


    for plugin version 1.2.6,
    in walkers.php,
    function count() (line 28):

    return $GLOBALS['wp_query']->post_count;

    changing post_count to found_posts seems to correct the selected terms count issue, when using pagination on WP.
    At least for me.


        function count() {
            $old_query = qmt_get_query();
            if ( $this->data['is-selected'] ) {
                //return $GLOBALS['wp_query']->post_count;
    	    return $GLOBALS['wp_query']->found_posts;
            $query = array(
                'tax_query' => array(
  4. Unsal Korkmaz
    Posted 3 years ago #

    Approved. Changed necessary line in first post's example site and its working properly now. Thank you @atti_simon

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Query Multiple Taxonomies
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.