Created
October 24, 2018 13:31
-
-
Save yousufansa/92a42ee14acc3731c53d9dcf9a1b80ad to your computer and use it in GitHub Desktop.
Jobhunt - Home v1 Custom Page Header with Register/Login Form
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
if ( ! function_exists( 'jh_child_home_v1_page_header_custom' ) ) { | |
function jh_child_home_v1_page_header_custom() { | |
$section_class = 'site-content-page-header'; | |
?><header class="<?php echo esc_attr( $section_class ); ?>" <?php echo jobhunt_site_content_bg_image(); ?>> | |
<div class="site-content-page-header-inner"> | |
<?php | |
do_action( 'jobhunt_home_page_header_before' ); | |
?> | |
<div class="site-content-page-header-custom"> | |
<div class="site-content-page-header-custom_content section-header"> | |
<h2 class="section-title"><?php echo esc_html__( 'Your Title', 'jobhunt' ); ?></h2> | |
<span class="section-sub-title"><?php echo esc_html__( 'Your Subtitle', 'jobhunt' ); ?></span> | |
</div> | |
<?php echo do_shortcode( '[jobhunt_register_login_form]' ); ?> | |
</div> | |
<style> | |
.site-content-page-header-custom { | |
display: flex; | |
flex-wrap: wrap; | |
align-items: center; | |
position: relative; | |
z-index: 1; | |
} | |
.site-content-page-header-custom .section-title, | |
.site-content-page-header-custom .section-sub-title { | |
color: #fff; | |
} | |
.site-content-page-header-custom .jobhunt-register-login-form .jobhunt-register-login-form-inner { | |
flex: 0 0 100%; | |
max-width: 100%; | |
margin-left: 0; | |
background: #fff; | |
} | |
.site-content-page-header-custom .site-content-page-header-custom_content, | |
.site-content-page-header-custom .jobhunt-register-login-form { | |
flex: 0 0 100%; | |
max-width: 100%; | |
padding-left: 15px; | |
padding-right: 15px; | |
} | |
@media (min-width: 992px) { | |
.site-content-page-header-custom .section-title { | |
font-size: 30px; | |
} | |
.site-content-page-header-custom .section-sub-title { | |
font-size: 18px; | |
} | |
.site-content-page-header-custom .site-content-page-header-custom_content, | |
.site-content-page-header-custom .jobhunt-register-login-form { | |
flex: 0 0 50%; | |
max-width: 50%; | |
padding-left: 15px; | |
padding-right: 15px; | |
text-align: left; | |
} | |
} | |
@media (min-width: 1200px) { | |
.site-content-page-header-custom .section-title { | |
font-size: 50px; | |
} | |
.site-content-page-header-custom .section-sub-title { | |
font-size: 20px; | |
} | |
.site-content-page-header-custom .site-content-page-header-custom_content { | |
flex: 0 0 60%; | |
max-width: 60%; | |
padding-left: 15px; | |
padding-right: 15px; | |
} | |
.site-content-page-header-custom .jobhunt-register-login-form { | |
flex: 0 0 40%; | |
max-width: 40%; | |
padding-left: 15px; | |
padding-right: 15px; | |
} | |
.site-content-page-header-custom .jobhunt-register-login-form .tab-content #jobhunt_login_form fieldset p:nth-child(3) { | |
width: 48.6%; | |
} | |
} | |
</style> | |
<?php | |
do_action( 'jobhunt_home_page_header_after' ); | |
?> | |
</div> | |
</header><?php | |
} | |
} | |
if ( ! function_exists( 'jobhunt_home_v1_search_block' ) ) { | |
function jobhunt_home_v1_search_block() { | |
if( ! is_user_logged_in() ) { | |
jh_child_home_v1_page_header_custom(); | |
} elseif ( jobhunt_is_wp_job_manager_activated() ) { | |
$home_v1 = jobhunt_get_home_v1_meta(); | |
$hsb_options = $home_v1['hsb']; | |
$args = apply_filters( 'jobhunt_home_v1_search_block_args', array( | |
'section_class' => isset( $hsb_options['section_class'] ) ? $hsb_options['section_class'] : '', | |
'section_title' => isset( $hsb_options['section_title'] ) ? $hsb_options['section_title'] : esc_html__( 'The Easiest Way to Get Your New Job', 'jobhunt' ), | |
'sub_title' => isset( $hsb_options['sub_title'] ) ? $hsb_options['sub_title'] : esc_html__( 'Find Jobs, Employment & Career Opportunities', 'jobhunt' ), | |
'search_placeholder_text' => isset( $hsb_options['search_placeholder_text'] ) ? $hsb_options['search_placeholder_text'] : esc_html__( 'Job title, keywords or company name', 'jobhunt' ), | |
'location_placeholder_text' => isset( $hsb_options['location_placeholder_text'] ) ? $hsb_options['location_placeholder_text'] : esc_html__( 'City, province or region', 'jobhunt' ), | |
'show_category_select' => isset( $hsb_options['show_category_select'] ) ? filter_var( $hsb_options['show_category_select'], FILTER_VALIDATE_BOOLEAN ) : false, | |
'category_select_text' => isset( $hsb_options['category_select_text'] ) ? $hsb_options['category_select_text'] : esc_html__( 'Any Category', 'jobhunt' ), | |
'show_browse_button' => isset( $hsb_options['show_browse_button'] ) ? filter_var( $hsb_options['show_browse_button'], FILTER_VALIDATE_BOOLEAN ) : false, | |
'browse_button_label' => isset( $hsb_options['browse_button_label'] ) ? $hsb_options['browse_button_label'] : esc_html__( 'Or browse job offers by', 'jobhunt' ), | |
'browse_button_text' => isset( $hsb_options['browse_button_text'] ) ? $hsb_options['browse_button_text'] : esc_html__( 'Category', 'jobhunt' ), | |
'browse_button_link' => isset( $hsb_options['browse_button_link'] ) ? $hsb_options['browse_button_link'] : '#' | |
) ); | |
jobhunt_home_search_block( $args ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment