Once a CPT is added, for instance the kb_article on the https://agencieshelp.automattic.com/, a filter needs to be added to functions.php to include the CPT in the Instant Search options. Example:
/**
* Filter the Jetpack Instant Search options to include KB articles.
*
* @param array $options The current Jetpack Instant Search options.
*
* @link https://developer.jetpack.com/hooks/jetpack_instant_search_options/
*
* @return array
*/
function pocket_casts_support_theme_jp_search_filter( array $options ) {
$options['adminQueryFilter'] = array(
'bool' => array(
'should' => array(
array( 'term' => array( 'post_type' => 'kb_article' ) ),
),
),
);
return $options;
}
add_filter( 'jetpack_instant_search_options', 'pocket_casts_support_theme_jp_search_filter' );
If the site is on Pressable or Atomic, you should be able to then trigger an index from Jetpack Debugger and notice the post type being indexed. If the site is on Simple, a bulk index need to be initiated via CLI by a developer in their dotcom sandbox. Example:
wp es-index bulk --name=jetpack-search --url=https://pocketcastssupport2024.wordpress.com/ --blog_id=233464120
After that successfully runs, you should be able to see the post type listed under the Jetpack Search section in Jetpack Debugger for the site.
Other helpful docs: https://jetpack.com/support/search/frequently-asked-questions/#troubleshooting-jetpack-search
