" . esc_html(get_theme_mod("claim", __("Display your claim here.", 'meteorite'))) . ""; } $contact = ''; if ( get_theme_mod('tel', '111.222.333') != '' ) { $contact .= "" . esc_html(get_theme_mod("tel", "+1 (0) 999-000")) . ""; } if ( get_theme_mod('email', 'example@company.com') != '' ) { $contact .= "" . antispambot(sanitize_email(get_theme_mod('email', 'example@company.com'))) . ""; } $social = ''; if ( get_theme_mod('social-media-one', 'www.facebook.com') != '' ) { $social .= "
  • "; } if ( get_theme_mod('social-media-two', 'plus.google.com') != '' ) { $social .= "
  • "; } if ( get_theme_mod('social-media-three', 'www.youtube.com') != '' ) { $social .= "
  • "; } if ( get_theme_mod('social-media-four', 'twitter.com') != '' ) { $social .= "
  • "; } if ( get_theme_mod('social-media-five', 'linkedin.com') != '' ) { $social .= "
  • "; } if ( get_theme_mod('social-media-six', 'pinterest.com') != '' ) { $social .= "
  • "; } ?>
    '; } } else { echo '
    '; if ( is_front_page() && is_home() ) : echo '

    ' . get_bloginfo('name', 'display') . '

    '; else : echo '

    ' . get_bloginfo('name', 'display') . '

    '; endif; echo '

    ' . get_bloginfo('description', 'display') . '

    '; echo '
    '; // /.site-brand } } /** * Main Navigation */ function meteorite_nav() { do_action('meteorite_before_header'); ?> ID, '_terra_themes_header_slider', true); if ( get_theme_mod('header_image_active', 1) == 1 && ( shortcode_exists('terra-themes-header-slider') && !empty( $terra_themes_header_slider_shortcode ) || !is_single() && !is_archive() && !is_search() && !is_404() && !is_home() && ( is_page() && has_post_thumbnail() ) ) ) { echo ' has-header'; } else { echo ' has-not-header'; } if ( get_theme_mod('header_image_active', 1) == 1 && ( shortcode_exists('terra-themes-header-slider') && !empty($terra_themes_header_slider_shortcode) ) ) { echo ' has-slider'; } } /** * Check if header exsists and return value */ function meteorite_check_header() { global $post; // Pages with no posts (like 404 or search without results) don't have a page ID $id = ( isset( $post->ID ) ? get_the_ID() : NULL ); if ( is_home() ) { $terra_themes_header_slider_shortcode = get_post_meta(get_queried_object_id(), '_terra_themes_header_slider', true); } elseif ( isset( $id ) && get_post_meta($post->ID, '_terra_themes_header_slider', true) ) { $terra_themes_header_slider_shortcode = get_post_meta($post->ID, '_terra_themes_header_slider', true); } if ( get_theme_mod('header_image_active', 1) == 1 && ( shortcode_exists('terra-themes-header-slider') && !empty( $terra_themes_header_slider_shortcode ) || !is_single() && !is_archive() && !is_search() && !is_404() && !is_home() && ( is_page() && has_post_thumbnail() ) ) ) { return 'has-header'; } else { return 'has-not-header'; } } /** * Echo menu position class */ function meteorite_menu_position() { if ( get_theme_mod('menu_pos', 'above') == 'below' ) { echo ' below'; } else if ( get_theme_mod('menu_pos', 'above') == 'above_solid' ) { echo ' above above-solid'; } else { echo ' above'; } } /** * Echo sticky class */ function meteorite_sticky_menu() { if ( get_theme_mod('sticky_menu', 'sticky') == 'sticky' ) { echo ' sticky'; } else { echo ' static'; } } /** * Header Titlebar */ function meteorite_header_titlebar() { if ( get_theme_mod('header_titlebar', 'off') == 'on' && ! is_front_page() && meteorite_check_header() != 'has-header' ) : ?>
    ' . get_the_title() . ''; elseif ( is_single() ) : echo '

    ' . get_the_title() . '

    '; elseif ( is_home() ) : echo '

    ' . get_the_title( get_option( 'page_for_posts' ) ) . '

    '; elseif ( is_category() ) : echo '

    ' . single_cat_title( '', false ) . '

    '; elseif ( is_search() ) : echo '

    ' . printf( esc_html__( 'Search Results for: %s', 'meteorite' ), '' . get_search_query() . '' ) . '

    '; elseif ( is_404() ) : echo '

    ' . esc_html( 'Oops! That page can’t be found.', 'meteorite' ) . '

    '; elseif ( is_tag() ) : echo '

    ' . single_tag_title() . '

    '; elseif ( is_day() ) : echo '

    ' . get_the_date() . '

    '; elseif ( is_month() ) : echo '

    ' . get_the_date( 'F Y' ) . '

    '; elseif ( is_year() ) : echo '

    ' . get_the_date( 'Y' ) . '

    '; elseif ( is_tax() ) : echo '

    ' . single_term_title('', false) . '

    '; // must be after is_year/month/day; otherwise they won't execute because is_archive would be true elseif ( is_archive() ) : the_archive_title( '

    ', '

    ' ); the_archive_description( '
    ', '
    ' ); elseif ( is_woocommerce() && !is_archive() ) : echo '

    ' . get_the_title() . '

    '; remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_template_single_title', 8 ); endif; ?>
    $delimiter ); woocommerce_breadcrumb( $args ); ?>
    ','

    '); ?>
    '; /* Header arrow button */ $header_button = ''; $header_image_arrow_url = get_theme_mod('headerimage_page_button_url', '#content'); if ( get_theme_mod('headerimage_fp_button_checkbox', 0) == 1 && is_front_page() ) { $header_button = ''; } elseif ( get_theme_mod('headerimage_page_button_checkbox', 0) == 1 && !is_front_page() ) { $header_button = ''; } /* Header overlay */ $overlay = ''; if ( get_theme_mod('headerimage_overlay_checkbox', 0) == 0 ) { $overlay = '
    '; } // Get Header Shortcode global $post; // Pages with no posts (like 404 or search without results) don't have a page ID $id = ( isset( $post->ID ) ? get_the_ID() : NULL ); if ( is_home() ) { $terra_themes_header_slider_shortcode = get_post_meta(get_queried_object_id(), '_terra_themes_header_slider', true); } elseif ( isset( $id ) && get_post_meta($post->ID, '_terra_themes_header_slider', true) ) { $terra_themes_header_slider_shortcode = get_post_meta($post->ID, '_terra_themes_header_slider', true); } if ( ! empty( $terra_themes_header_slider_shortcode ) && shortcode_exists( 'terra-themes-header-slider' ) ) { // Shortcode echo '
    ' . do_shortcode($terra_themes_header_slider_shortcode) . '
    '; } elseif ( is_front_page() || is_page() ) { // Image if ( has_post_thumbnail() ) { $responsive_header_image = ''; if ( get_theme_mod('header_image_responsive', 0) == 1 ) { $responsive_header_image = 'responsive-header-image'; } $src = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); // Page details $header_image_title = get_post_meta($post->ID, '_meteorite_image_header_title', true); $header_image_title_tag = get_post_meta($post->ID, '_meteorite_image_header_title_tag', true); $header_image_text = get_post_meta($post->ID, '_meteorite_image_header_text', true); $header_image_text_tag = get_post_meta($post->ID, '_meteorite_image_header_text_tag', true); $cta_button_text_one = get_post_meta($post->ID, '_meteorite_header_button_text_one', true); $cta_button_link_one = get_post_meta($post->ID, '_meteorite_header_button_link_one', true); $cta_button_text_two = get_post_meta($post->ID, '_meteorite_header_button_text_two', true); $cta_button_link_two = get_post_meta($post->ID, '_meteorite_header_button_link_two', true); $tagOptions = array('', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'); if ( in_array($header_image_title_tag, $tagOptions) && !empty($header_image_title_tag) ) { $title_tag = $header_image_title_tag; } else { $title_tag = 'h2'; } if ( in_array($header_image_text_tag, $tagOptions) && !empty($header_image_text_tag) ) { $text_tag = $header_image_text_tag; } else { $text_tag = 'p'; } ?>
    ' . esc_html($header_image_title) . ''; } ?> ' . esc_html($header_image_text) . ''; } ?>
    '; // /.header-area do_action('meteorite_after_hero'); endif; }