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

    (@msaari)

    That’s just for excerpts. You need to use relevanssi_content_to_index filter hook to add content to posts. The syntax is fairly similar, you can use the same function excepts the relevanssi_content_to_index doesn’t have the $query parameter, just $content and $post.

    add_filter('relevanssi_content_to_index', 'custom_fields_to_excerpts', 10, 2);
    function custom_fields_to_excerpts($content, $post) {
        $content .= " frank";
        return $content;
    }

    Add this, rebuild the index, and you should find all posts for “frank”. Add the function you did, and you’ll see it in the excerpts as well.

Viewing 1 replies (of 1 total)
  • The topic ‘Can;t search for ACF sub field’ is closed to new replies.