Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Include bbPress 'topic' custom post type in WordPress' search results */
function ntwb_bbp_topic_cpt_search( $topic_search ) {
$topic_search['exclude_from_search'] = false;
return $topic_search;
}
add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' );
/**
* Include bbPress 'forum' custom post type in WordPress' search results */
function ntwb_bbp_forum_cpt_search( $forum_search ) {
$forum_search['exclude_from_search'] = false;
return $forum_search;
}
add_filter( 'bbp_register_forum_post_type', 'ntwb_bbp_forum_cpt_search' );
/**
* Include bbPress 'reply' custom post type in WordPress' search results */
function ntwb_bbp_reply_cpt_search( $reply_search ) {
$reply_search['exclude_from_search'] = false;
return $reply_search;
}
add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' );
@HoussenMoshine

This comment has been minimized.

Copy link
Owner Author

commented Oct 14, 2017

Un exemple de code pour régler un problème que j'avais sur l'affichage des résultats provenant de BBpress dans Wordpress. https://housseniawriting.com/topic/la-recherche-sur-un-forum-bbpress/#post-8928

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.