• Resolved Marissa

    (@marissabracke)


    I have confirmed through Query Monitor that my site search is restricting the search to only pages and posts:

    SELECT COUNT(DISTINCT(relevanssi.doc))
    FROM wpk9_relevanssi AS relevanssi
    WHERE (relevanssi.term LIKE 'meeting%'
    OR relevanssi.term_reverse LIKE CONCAT(REVERSE('meeting'), '%'))
    AND relevanssi.doc NOT IN (255243,254860,255238,255044,255058,255014,254806)
    AND ( relevanssi.doc IN (
    SELECT DISTINCT(posts.ID)
    FROM wpk9_posts AS posts
    WHERE posts.post_type IN ('page', 'post') ) )

    But I am not sure what to do now that I know this information. How do I fix this issue so that it searches tribe_events also (from The Events Calendar plugin)? I have confirmed through using the Admin Search that the tribe_events are being indexed. I am using Divi 4.17.2.

    Thank you for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    If you can’t find any place in your theme to remove the restriction to posts and pages, you can add this to your theme functions.php or in a code snippet:

    add_filter( 'relevanssi_modify_wp_query', function( $q ) {
      $q->set( 'post_type', array( 'post', 'page', 'tribe_events' );
      return $q;
    } );
    Thread Starter Marissa

    (@marissabracke)

    That code snippet worked! Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Only searching pages & posts’ is closed to new replies.