qa
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
1 changed file
with
6 additions
and
5 deletions
| ... | @@ -17,21 +17,22 @@ add_action( 'init' , 'wptp_add_tags_to_attachments' ); | ... | @@ -17,21 +17,22 @@ add_action( 'init' , 'wptp_add_tags_to_attachments' ); |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | function filter_query_args( $query_args, $sfid ) { | 19 | function filter_query_args( $query_args, $sfid ) { |
| 20 | $query_args['posts_per_page'] = -1; | 20 | error_log(print_r($query_args,true)); |
| 21 | $query_args['orderby'] = 'relevance'; | 21 | //$query_args['posts_per_page'] = -1; |
| 22 | $query_args['order'] = 'ASC'; | 22 | //$query_args['orderby'] = 'relevance'; |
| 23 | //$query_args['order'] = 'ASC'; | ||
| 23 | 24 | ||
| 24 | return $query_args; | 25 | return $query_args; |
| 25 | 26 | ||
| 26 | } | 27 | } |
| 27 | add_filter( 'sf_edit_query_args', 'filter_query_args', 99, 2 ); | 28 | //add_filter( 'sf_edit_query_args', 'filter_query_args', 99, 2 ); |
| 28 | 29 | ||
| 29 | function relevant_search_result( $q ) { | 30 | function relevant_search_result( $q ) { |
| 30 | if ( is_search() && is_main_query() ) | 31 | if ( is_search() && is_main_query() ) |
| 31 | $q->set( 'orderby', 'relevance'); | 32 | $q->set( 'orderby', 'relevance'); |
| 32 | $q->set( 'order', 'ASC'); | 33 | $q->set( 'order', 'ASC'); |
| 33 | } | 34 | } |
| 34 | add_action( 'pre_get_posts', 'relevant_search_result' ); | 35 | //add_action( 'pre_get_posts', 'relevant_search_result' ); |
| 35 | 36 | ||
| 36 | add_action('init','set_exclude_from_search'); | 37 | add_action('init','set_exclude_from_search'); |
| 37 | function set_exclude_from_search() | 38 | function set_exclude_from_search() | ... | ... |
-
Please register or sign in to post a comment