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
    272 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!
  • 0 Votes
    3 Posts
    1k Views
    I
    @epsilonadmin custom block. Here is info how to create block - https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/ So we register new block, assigned fields for this block. We add block on page. When I try to search phrase from one of these field - page not added to search result
  • Filter and sort result list

    Frequently Asked Questions
    4
    0 Votes
    4 Posts
    921 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
    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.
  • 0 Votes
    4 Posts
    1k Views
    EpsilonAdminE
    Correct, you can justify the styling of the Smart Excerpt part using CSS block in the WPFTS Pro Settings / Search & Output. Your webmaster can use it. Other parts of the search results page are not accessible for the plugin.

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