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
b01090ec
authored
2023-08-29 18:09:46 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
www
Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent
9d738c0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
wp-content/themes/msf-child/blocks/relevant-resources/relevant-resources.php
wp-content/themes/msf-child/inc/search-extras.php
wp-content/themes/msf-child/blocks/relevant-resources/relevant-resources.php
View file @
b01090e
...
...
@@ -94,7 +94,7 @@ foreach($posts as $post ) {
$term_list
=
$term
->
name
;
}
}
update_post_meta
(
$post
->
ID
,
'exclude_from_search'
,
0
);
if
(
$post_type
==
'documents'
){
$link
=
get_post_meta
(
$post
->
ID
,
'document_link'
,
true
);};
echo
'<tr><td><div class="rel">'
;
if
(
$image
)
:
...
...
wp-content/themes/msf-child/inc/search-extras.php
View file @
b01090e
...
...
@@ -14,7 +14,7 @@ function exclude_in_search_results( $query ) {
if
(
$query
->
is_main_query
()
&&
$query
->
is_search
()
&&
!
is_admin
()
)
{
$query
->
set
(
'post_type'
,
array
(
'post'
,
'attachment'
,
'pages'
,
'documents'
,
'documents'
)
);
$query
->
set
(
'post_type'
,
array
(
'attachment'
,
'documents'
)
);
$query
->
set
(
'meta_query'
,
array
(
'relation'
=>
'OR'
,
...
...
@@ -22,7 +22,7 @@ function exclude_in_search_results( $query ) {
'relation'
=>
'AND'
,
array
(
'key'
=>
'exclude_from_search'
,
'value'
=>
'1'
,
'value'
=>
1
,
'compare'
=>
'!='
,
),
),
...
...
@@ -30,7 +30,7 @@ function exclude_in_search_results( $query ) {
}
}
//
add_action( 'pre_get_posts', 'exclude_in_search_results' );
add_action
(
'pre_get_posts'
,
'exclude_in_search_results'
);
...
...
Please
register
or
sign in
to post a comment