Get WPFTS Pro today with 25% discount!

number of results for a WPFTS Pro search

Frequently Asked Questions
3 2 1.2k 2

  • We have WPFTS Pro installed on our site, and I continue to be impressed by how fast and comprehensive it is for searches.

    I've been working on configuring the plugin, and I'd like to be able to have WPFTS display the total number of results returned for a given search. (in addition/as opposed to the score).

    Thanks in advance for any recommendations/suggestions you can offer.


  • Do you mean a number of the relevant words for each search result item or a total of posts found?

    If you need only the number of found posts, you can use WP_Query's property found_posts.

    $wp_query->found_posts;
    

    I didn't test this, but it should work.


  • Thank you, works like a charm. Much appreciated!

Suggested Topics

  • 0 Votes
    2 Posts
    275 Views
    EpsilonAdminE
    Hi @Simply_Friend Thank you for the question. Actually it's not planned to be added to the plugin core, because this feature (search by date FROM - TO) is already implemented in WP Native search (in WP_Query()). So you can search with date using WP_Query parameter date_query. Here is the topic: https://developer.wordpress.org/reference/classes/wp_query/#date-parameters Another question is if you want date picker fields to be added next to the text query field in the search widget. This is fairly easy to do for the average WP developer. There are probably some visual constructors to do this, but I can’t recommend anything here - if you find a solution, please write. It will be useful for other users. We don't plan to add a search form builder to the core functionality of WPFTS because we don't want to compete with Elementor / Beaver Builder / Visual Builder etc etc, although we will probably do a detailed tutorial on how to use the builders to make a search widget with additional fields. Hope this helped you. Thanks!
  • Filter and sort result list

    Frequently Asked Questions
    4
    0 Votes
    4 Posts
    928 Views
    EpsilonAdminE
    Hi @ilocimwca It's simple to do with this addon https://fulltextsearch.org/wpfts-addon-files-only-1.0.1.zip It contains some code to limit post_type to 'attachment' only: add_action('pre_get_posts', function(&$wpq) { if ($wpq->is_search && $wpq->is_main_query()) { $wpq->set('post_type', array('attachment')); $wpq->set('post_status', array('inherit')); } }); Pretty simple. If you want to set up your own post_types, just modify this code. You can read about full WP_Query() parameters at the Wordpress official documentation.
  • 0 Votes
    2 Posts
    960 Views
    EpsilonAdminE
    Hi, @wonderbuild Should be you are using the "WPFTS :: Live Search" widget. This widget is intended to show this live search data. If you don't want them, simply use the native WP Search widget. Hope it helps.
  • 1 Votes
    1 Posts
    938 Views
    No one has replied
  • 0 Votes
    2 Posts
    1k Views
    EpsilonAdminE
    Sorry, I just detected your message. Please could you follow this small guide? If it does not help, write to me here again. I will need to know the theme you're using and, possibly, the URL of your website to make some checks.

Be the first to read the news!

We are always improving our products, adding new functions and fixes. Subscribe now to be the first to get the updates and stay informed about our sales! We are not spammy. Seriously.

Join Us Now!

We are a professional IT-team. Many of us have been working in a Web IT field for more than 10 years. Our advanced experience of software development has been employed in the creation of the WordPress FullText Search plugin. All solutions implemented into the plugin have been used for 5 or more years in over 60 different web-projects.

We are looking forward to your comments, requests and suggestions in relation to the current plugin and future updates.

ewm-logo-450

The forum powered by NodeBB | Contributors