Search Results and Recurring Events

Home Forums Calendar Products Events Calendar PRO Search Results and Recurring Events

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1107049
    renaissancecreative
    Participant

    Hi,

    When someone searches the website for any of the events such as:
    Shakespeare
    It returns every occurence of a recurring event, this results in lots of repeated information.

    Can you suggest how I can modify the results so that it only shows the main event as it were.
    I am actually changing the results so it sepearates the results into post types as it stands but I can’t work out what i’m doing wrong with the results.

    Can you point me the right direction.

    #1107242
    George
    Participant

    Hey @Renaissancecreative,

    Thanks for reaching out!

    Pulling off this adjustment of search results is actually a pretty complicated thing to do. 🙁 We are not able to help with customizations, but still like to try and at least help point folks in the right direction to get started on their own.

    For modifying search results in this way, the only thing I could think of would be to use the WordPress pre_get_posts() in search results. Recurring events are “child posts” of a single parent post (the parent is the first post in the series)—so if you can hook into the search query and try to make it ignore “child posts,” you might be in luck.

    Here are some resources for learning more about modifying queries and such:

    • https://codex.wordpress.org/Custom_Queries
    • https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts
    • http://www.remicorson.com/modifying-the-current-query-with-pre_get_posts/
    • http://wordpress.stackexchange.com/questions/140664/custom-search-query
    • https://premium.wpmudev.org/blog/build-your-own-custom-wordpress-search/

    Best of luck with your tinkering!
    George

    #1113275
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Search Results and Recurring Events’ is closed to new replies.