Continue reading Indexing embedded PDFs for the parent post

Indexing embedded PDFs for the parent post

Relevanssi can automatically index PDF content for the parent post, if the PDF (or other attachment) is attached to the parent post in WordPress. However, that’s not always the case. Sometimes the PDF is attached to the page using an embed, and that doesn’t create a connection between the posts in WordPress. Thus, Relevanssi won’t…

Read more Indexing embedded PDFs for the parent post 0 Comment on Indexing embedded PDFs for the parent post
Continue reading Chamber Dashboard Business Directory

Chamber Dashboard Business Directory

The Chamber Dashboard Business Directory plugin has a business directory search that’s not compatible with Relevanssi. To disable Relevanssi in those searches, add this to your theme functions.php: add_filter( ‘relevanssi_prevent_default_request’, ‘rlv_allow_chamber_search’, 10, 2 ); function rlv_allow_chamber_search( $prevent, $query ) { if ( isset( $_GET[’searchtext’] ) ) { $prevent = false; } return $prevent; }add_filter( ‘relevanssi_prevent_default_request’,…

Read more Chamber Dashboard Business Directory 0 Comment on Chamber Dashboard Business Directory
Continue reading Gmedia photo gallery tags

Gmedia photo gallery tags

Gmedia photo gallery gives a false impression of working with Relevanssi, as you can see the gmedia_tag taxonomy appear in the list of taxonomies: However, if you try to index those tags, you’ll soon notice Relevanssi isn’t actually indexing them. That’s because Gmedia gallery doesn’t use that taxonomy for the tags. The tags are actually…

Read more Gmedia photo gallery tags 0 Comment on Gmedia photo gallery tags
Continue reading WP Job Manager

WP Job Manager

Relevanssi doesn’t work with the WP Job Manager search. Solution is fortunately simple: you can just disable Relevanssi for the WP Job Manager page. To disable Relevanssi, add this to your theme functions.php: add_action( ‘get_job_listings_init’, ‘relevanssi_fix_for_wp_job_manager’ );   function relevanssi_fix_for_wp_job_manager( $args ){ remove_filter(’posts_request’, ‘relevanssi_prevent_default_request’); remove_filter(’the_posts’, ‘relevanssi_query’); }add_action( ‘get_job_listings_init’, ‘relevanssi_fix_for_wp_job_manager’ ); function relevanssi_fix_for_wp_job_manager( $args ){ remove_filter(‘posts_request’,…

Read more WP Job Manager 0 Comment on WP Job Manager
Continue reading WPML and category exclusions

WPML and category exclusions

Relevanssi category exclusion setting doesn’t work properly with WPML. Here’s a bit of code from Srdjan Jocić from OnTheGoSystems that fixes it. Just add this to your theme functions.php. add_filter( ‘relevanssi_search_filters’, ‘wpml_relevanssi_include_exclude_cats_fix’ ); function wpml_relevanssi_include_exclude_cats_fix( $args ) { if ( array_key_exists( ‘tax_query’, $args ) && did_action( ‘wpml_loaded’ ) ) {   foreach ( $args[’tax_query’] as…

Read more WPML and category exclusions 0 Comment on WPML and category exclusions
Continue reading SearchWP Live Ajax Search

SearchWP Live Ajax Search

Relevanssi doesn’t ship with a live search feature that would display results as the user types the search terms. There are many other plugins that provide this functionality, but few work with Relevanssi. SearchWP Live Ajax Search is the best one that does. It’s very easy to use, most of the time just install and…

Read more SearchWP Live Ajax Search 2 Comments on SearchWP Live Ajax Search
Continue reading WP All Import compatibility

WP All Import compatibility

By default posts imported with WP All Import do not get indexed by Relevanssi. The importing process does not trigger Relevanssi indexing. That is, however, easy to remedy: add_action(’pmxi_saved_post’, ‘post_saved’, 10, 1); function post_saved($id) { relevanssi_index_doc($id, true, relevanssi_get_custom_fields(), true); }add_action(‘pmxi_saved_post’, ‘post_saved’, 10, 1); function post_saved($id) { relevanssi_index_doc($id, true, relevanssi_get_custom_fields(), true); } Add this code to…

Read more WP All Import compatibility 2 Comments on WP All Import compatibility
Continue reading Conflict with User Access Manager

Conflict with User Access Manager

Relevanssi has a conflict with User Access Manager plugin. Both plugins attach to the same `the_posts` filter hook with the same priority, and if UAM runs after Relevanssi, it may cause some issues, like missing excerpts or even broken search results pages. The solution seems simple, however: at least in the one case I’ve run…

Read more Conflict with User Access Manager 0 Comment on Conflict with User Access Manager
Continue reading bbP Private Groups support

bbP Private Groups support

Private Groups is a plugin that makes bbPress forum groups private. Relevanssi, however, doesn’t understand that privacy and will show those groups in the search results. Relevanssi has means to support this, however, with the help of the relevanssi_post_ok filter. Here’s some code from Mark Wass that makes the private forum posts private in search.…

Read more bbP Private Groups support 0 Comment on bbP Private Groups support