Forum Replies Created
- 
		
			
In reply to: Search only topics not forum / repliesThanks again 🙂 In reply to: Search only topics not forum / repliesIn a custom plugin I just made 🙂 In reply to: Search only topics not forum / repliesI found a way to put it in a plugin 🙂 I Thought I would have to hook into ‘plugins_loaded’ like so: add_action( 'plugins_loaded', 'bbpress_overwrite' ); function bbpress_overwrite() { add_filter ('bbp_before_has_search_results_parse_args', 'rew_amend_search') ; } function rew_amend_search ($args) { $args['post_type'] = bbp_get_topic_post_type() ; return $args ; }But for some reason this was enough: ? add_filter ('bbp_before_has_search_results_parse_args', 'rew_amend_search') ; function rew_amend_search ($args) { $args['post_type'] = bbp_get_topic_post_type() ; return $args ; }In reply to: Search only topics not forum / repliesReally nice. Worked like a charm 🙂 ! Can I put this in a custom plugin instead of functions.php ? In reply to: Search only topics not forum / repliesIf I could put the solution in a custom plugin it would be really awesome 🙂 In reply to: Search only topics not forum / repliesNo worries 🙂 I am just happy to get help. I want to change the function: bbp_has_search_results. Where I replace: $default_post_type = array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ); With: $default_post_type = array(bbp_get_topic_post_type(), bbp_get_reply_post_type() ); In reply to: Search only topics not forum / repliesCan I also override files in the “includes” folder (bbpress/includes/search/template.ph) in a child theme? In reply to: Search only topics not forum / repliesThe problem is, using the template solution will get overwritten when I update the the bbPress plugin…:( In reply to: Search only topics not forum / repliesI put this: add_filter ('bbp_before_get_search_terms_parse_args', 'pluus_amend_search') ; function pluus_amend_search ($args) { $args['post_type'] = bbp_get_topic_post_type() ; return $args ; }in my wp-content/themes/<ThemeName>/functions.php But Forum names (“bbp_get_forum_post_type()”) are still included in the search results on the frontend. Only editing “plugins/bbpress/includes/search/template.php” works 🙂 In reply to: Search only topics not forum / repliesHi Robin W 🙂 The above solution does not work in 2019. Is there a new way to only search topics and replies as of now ?