Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
MSF
/
msf-climate-hub
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1045124c
authored
2023-11-22 11:29:24 -0500
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
qa
Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent
595ad8f2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
wp-content/themes/msf-child/inc/search-extras.php
wp-content/themes/msf-child/inc/search-extras.php
View file @
1045124
...
...
@@ -17,21 +17,22 @@ add_action( 'init' , 'wptp_add_tags_to_attachments' );
function
filter_query_args
(
$query_args
,
$sfid
)
{
$query_args
[
'posts_per_page'
]
=
-
1
;
$query_args
[
'orderby'
]
=
'relevance'
;
$query_args
[
'order'
]
=
'ASC'
;
error_log
(
print_r
(
$query_args
,
true
));
//$query_args['posts_per_page'] = -1;
//$query_args['orderby'] = 'relevance';
//$query_args['order'] = 'ASC';
return
$query_args
;
}
add_filter
(
'sf_edit_query_args'
,
'filter_query_args'
,
99
,
2
);
//
add_filter( 'sf_edit_query_args', 'filter_query_args', 99, 2 );
function
relevant_search_result
(
$q
)
{
if
(
is_search
()
&&
is_main_query
()
)
$q
->
set
(
'orderby'
,
'relevance'
);
$q
->
set
(
'order'
,
'ASC'
);
}
add_action
(
'pre_get_posts'
,
'relevant_search_result'
);
//
add_action( 'pre_get_posts', 'relevant_search_result' );
add_action
(
'init'
,
'set_exclude_from_search'
);
function
set_exclude_from_search
()
...
...
Please
register
or
sign in
to post a comment