Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
In reply to: Search only topics not forum / replies
Whoa! Thanks!
In reply to: Search only topics not forum / repliesHmph… okay… I’ve noticed that /plugins/bbpress/includes/search/template.php is actually responsible for that feature:
function bbp_has_search_results( $args = '' ) { global $wp_rewrite; /** Defaults **************************************************************/ $default_post_type = array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ); // Default query args $default = array( 'post_type' => $default_post_type, // Forums, topics, and replies 'posts_per_page' => bbp_get_replies_per_page(), // This many 'paged' => bbp_get_paged(), // On this page 'orderby' => 'date', // Sorted by date 'order' => 'DESC', // Most recent first 'ignore_sticky_posts' => true, // Stickies not supported 's' => bbp_get_search_terms(), // This is a search );So, changing ‘post_type’ => $default_post_type to ‘post_type’ => bbp_get_topic_post_type() works. However, it’s not clearly the best practice to modify the plugin directly anyother way to override this?
Viewing 2 replies - 1 through 2 (of 2 total)