Created
December 19, 2013 10:18
-
-
Save ntwb/8037110 to your computer and use it in GitHub Desktop.
bbPress - Custum Search Results
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
<?php | |
/* | |
Plugin Name: bbPress - Custum Search Results | |
Plugin URI: https://gist.github.com/ntwb/8037110 | |
Description: bbPress - Custum Search Results | |
Version: 0.1 | |
Author: Stephen Edgar - Netweb | |
Author URI: http://netweb.com.au | |
*/ | |
add_filter ( 'bbp_before_has_search_results_parse_args', ntwb_bbpress_custom_search_results); | |
function ntwb_bbpress_custom_search_results() { | |
$default_post_type = array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ); | |
$args['post_type'] = $default_post_type; | |
$args['orderby'] = 'date'; | |
$args['ignore_sticky_posts'] = 'false'; | |
$args['order'] = 'DESC'; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment