Created
February 5, 2018 01:22
-
-
Save albionselimaj/5864b4c23d508c004115c286e5ef6fb4 to your computer and use it in GitHub Desktop.
Add global listing type / global search
This file contains hidden or 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
- Add a new listing type, and set it's "slug" to "global". | |
- In the Explore page, using Elementor, set this new listing type as the first option in the "Types" tab | |
- In my-listing/includes/integrations/wp-job-manager/wp-job-manager-queries.php around line 235, | |
replace this: | |
``` | |
$args['meta_query'][] = [ | |
'key' => '_case27_listing_type', | |
'value' => $listing_type, | |
'compare' => '=' | |
]; | |
``` | |
with this: | |
``` | |
if ( $listType->get_slug() !== 'global' ) { | |
$args['meta_query'][] = [ | |
'key' => '_case27_listing_type', | |
'value' => $listing_type, | |
'compare' => '=' | |
]; | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment