Created
October 14, 2017 05:40
-
-
Save HoussenMoshine/7ddc2aa76b5a938b9f9c2b89a55caf03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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