Display number of search result

Home Forums Calendar Products Events Calendar PRO Display number of search result

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1221444
    Sally Newcomb
    Participant

    As I have over 1200 (and increasing) forthcoming events, it would be helpful for users if they could see how many results have been returned when they use the search. If they see there are, for example, 138 results for a search term, they can then use the filters to narrow it down further.

    Is it possible and if so, how do we implement it?

    I do intend to upgrade to the newer version when the ongoing issues have been solved. Meanwhile, I am testing it on a local server until it appears stable.

    #1222419
    Andras
    Keymaster

    Hi Sally,

    Thanks for reaching out with your question.

    At the moment that is not a functionality that is available out of the box. To develop this would require quite some time and customization work, which we are very limited in doing and supporting, but I can point you in the right direction.

    I would start with the $wp_query->found_posts. Probably the best place to access this would be this action: https://codex.wordpress.org/Plugin_API/Action_Reference/posts_selection

    It is probable that checking this variable will tell you the total amount found. If it doesn’t and instead shows the number of events on the displayed page (which would usually be 20), then a little more work will be necessary. Then you will need to rerun the query but will need to remove an item or two from the WHERE clause.

    I hope this helps.

    Cheers,
    Andras

    #1234582
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Display number of search result’ is closed to new replies.