Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created March 25, 2020 08:16
Show Gist options
  • Save yousufansa/7f357e5dd8856f35d3885f69d96884f2 to your computer and use it in GitHub Desktop.
Save yousufansa/7f357e5dd8856f35d3885f69d96884f2 to your computer and use it in GitHub Desktop.
Jobhunt - Replace Job Location With Job Category on Header Search Form
if( ! function_exists( 'jh_child_job_header_search_block_enable_categories' ) ) {
function jh_child_job_header_search_block_enable_categories( $args ) {
if( is_post_type_archive( 'job_listing' ) || is_page( jh_wpjm_get_page_id( 'jobs' ) ) ) {
$args['show_category_select']= true;
}
return $args;
}
}
add_filter( 'jobhunt_job_header_search_block_args', 'jh_child_job_header_search_block_enable_categories' );
.job-search-block .job-search-location {
display: none !important;
}
.post-type-archive-job_listing .site-content-page-header .job-search-block .job-search-category {
display: block;
}
.post-type-archive-job_listing .site-content-page-header .job-search-block .job-search-category select {
height: 100%;
}
@media (min-width: 768px) {
.post-type-archive-job_listing .site-content-page-header .job-search-block .job-search-category {
flex: 0 0 30.8333333333%;
max-width: 30.8333333333%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment