• Resolved tusarpanja

    (@tusarpanja)


    Hi, I am using a custom search query using a custom keyword but looks like the ‘Average no. of results’ field is not showing the exact result count.. Could you please check and help to find out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Cornel Raiu

    (@cornelraiu-1)

    Hello @tusarpanja ,

    When using the standard WP search, the plugin uses the $wp_query->found_posts in order to get the results.

    That means, on a custom search query, it doesn’t know where to get the result from. For exactly this kind of case I added the mwtsa_result_count filter that you can use to send a custom number of results.

    Here is the filter signature. You may check it out in the search-analytics/includes/class.process-query.php file.

    apply_filters( 'mwtsa_result_count', $wp_query->found_posts, $search_term )

    Let me know how that goes.

    Thanks!

    Plugin Author Cornel Raiu

    (@cornelraiu-1)

    Hello @tusarpanja ,

    Any update here?

    Thanks!

    Plugin Author Cornel Raiu

    (@cornelraiu-1)

    I will close this thread as inactive. If you are still having issues, please start another one.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘‘Average no. of results’ not correct’ is closed to new replies.