Skip to content

Instantly share code, notes, and snippets.

@dexit
Forked from yousufansa/functions.php
Created December 16, 2024 16:32
Show Gist options
  • Save dexit/2cfcd6712e37695943955bc7e2ca5d80 to your computer and use it in GitHub Desktop.
Save dexit/2cfcd6712e37695943955bc7e2ca5d80 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