Skip to content

Instantly share code, notes, and snippets.

@albionselimaj
Created February 5, 2018 01:22
Show Gist options
  • Save albionselimaj/5864b4c23d508c004115c286e5ef6fb4 to your computer and use it in GitHub Desktop.
Save albionselimaj/5864b4c23d508c004115c286e5ef6fb4 to your computer and use it in GitHub Desktop.
Add global listing type / global search
- 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