Skip to main contentSkip to footer

Using Relevanssi with WP Event Manager requires you to adjust the search process in WP Event Manager a bit. Fortunately, the plugin has good filters you can use. Add this to your site:

add_filter( 'get_event_listings_query_args', function( $args ) {
  $args['relevanssi'] = true;
  return $args;
} );

This will adjust the event listing query arguments to switch on the Relevanssi flag, causing Relevanssi to process the results. This way you’ll get the Relevanssi results in the WP Event Manager event listing search. These Relevanssi results will also be cached by the WP Event Manager query caching.

Thanks to dustyyy on WP support forums.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Menu problems in multisite search

Sometimes multisite searches cause problems in navigation menus. This is caused by pages from another subsite going into the page cache, and then replacing a page in the navigation menu with the same page ID. If you’re having this problem, adding the following code to the theme functions.php should solve……the issue. add_action( ‘wp_head’, ‘rlv_uncache_menu_posts’, 99 ); function rlv_uncache_menu_posts() { if ( is_search() ) { global $wpdb; $ids = $wpdb->get_col(“SELECT meta.meta_value FROM $wpdb->posts as posts, $wpdb->postmeta as meta WHERE posts.ID = meta.post_id AND posts.post_type = ‘nav_menu_item’ AND meta.meta_key = ‘_menu_item_object_id'”); if ( is_array( $ids ) ) { foreach ( $ids…

How to index parent categories

Suppose you have a parent category with no products in it but a child category does. If you search by the parent category can relevanssi be set up to show the products in the child category? Cars > Wiper Blades. A search for cars shows wiper blade products. By default…

Search shortcode

Relevanssi adds a shortcode to help making links to search results. That way users can easily find more information about a given subject from your blog. The syntax is simple: John Doe This will make the text John Doe a link to search results for John Doe. In case you…

Related Posts:

Comment Section:

2 Comments. Leave new

  • Thanks for your work ! But it doesn’t work for me 🙁 …
    As I have to work “codeless” (french little administration), your solution using Snipet was a great things for me (add function without have some “strange” things the website)… But I have no difference between before and after add this code in snipet (other codes works with snipet…). Have you got somes update on this topic ? 🙂

    Reply
    • Unfortunately, I don’t know, Pedrot. The work was never done by me, it was done by dustyyy from WP.org forums, I just improved it a bit. I’ve never tried the code myself, so I don’t know how WP Event Manager works in the first place. But do try disabling caching in WP Event Manager; if the cache is enabled, it’s possible you’re seeing cached results. The code should work from a snippet, no problems there.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed