<?php
if ( ! defined( 'ABSPATH' ) ) {
die();
}
/**
* template_parts/header/header.php
*/
if ( 'yes' == riode_get_layout_value( 'general', 'reading_progress' ) ) {
echo '<div class="rpb-wrapper"><span class="rpb"></span></div>';
}
if ( 'riode_template' == get_post_type() && 'header' == get_post_meta( get_the_ID(), 'riode_template_type', true ) ) {
echo '<header class="header custom-header header-' . get_the_ID() . '" id="header">';
if ( have_posts() ) :
the_post();
the_content();
wp_reset_postdata();
endif;
echo '</header>';
} elseif ( is_numeric( riode_get_layout_value( 'header', 'id' ) ) ) {
if ( -1 != riode_get_layout_value( 'header', 'id' ) ) {
echo '<header class="header custom-header header-' . riode_get_layout_value( 'header', 'id' ) . '" id="header">';
riode_print_template( riode_get_layout_value( 'header', 'id' ) );
echo '</header>';
}
} else {
echo '<header class="header pt-5 pb-5" id="header">';
echo '<div class="container d-flex align-items-center justify-content-between">';
echo '<a href="' . esc_url( home_url() ) . '" class="' . esc_attr( is_rtl() ? 'ml-4' : 'mr-4' ) . '">';
if ( riode_get_option( 'custom_logo' ) ) {
echo '<img src="' . esc_url( str_replace( array( 'http:', 'https:' ), '', wp_get_attachment_url( riode_get_option( 'custom_logo' ) ) ) ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '">';
} else {
echo '<img src="' . RIODE_ASSETS . '/images/logo.png" width="153" height="44"></img></a>';
}
echo '</a>';
if ( has_nav_menu( 'main-menu' ) ) {
ob_start();
$menu_locations = get_nav_menu_locations();
wp_nav_menu(
array(
'menu' => isset( $menu_locations['main-menu'] ) ? $menu_locations['main-menu'] : 0,
'container' => 'nav',
'container_class' => 'main-menu skin1 d-none d-lg-block',
'items_wrap' => '<ul id="%1$s" class="menu menu-main-menu horizontal-menu">%3$s</ul>',
'walker' => new Riode_Walker_Nav_Menu(),
)
);
$nav_html_escaped = ob_get_clean();
if ( $nav_html_escaped ) {
if ( riode_get_option( 'mobile_menu_items' ) ) {
echo '<a href="#" class="mobile-menu-toggle d-show-mob"><i class="d-icon-bars2"></i></a>';
}
echo riode_strip_script_tags( $nav_html_escaped );
}
}
if ( empty( $nav_html_escaped ) ) {
echo '<div class="welcome-msg-wrapper flex-1 text-' . esc_attr( is_rtl() ? 'left' : 'right' ) . ' overflow-hidden"><p class="mb-0 text-uppercase welcome-msg">' . esc_html__( 'Welcome to Riode Store Message or Remove it!', 'riode' ) . '</p></div>';
}
echo '</div>';
echo '</header>';
}
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="keywords" content="WordPress Template" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
$preload_fonts = riode_get_option( 'preload_fonts' );
if ( ! empty( $preload_fonts ) ) {
if ( in_array( 'riode', $preload_fonts ) ) {
echo '<link rel="preload" href="' . RIODE_ASSETS . '/vendor/riode-icons/fonts/riode.ttf?5gap68" as="font" type="font/ttf" crossorigin>';
}
if ( in_array( 'fas', $preload_fonts ) ) {
echo '<link rel="preload" href="' . RIODE_ASSETS . '/vendor/fontawesome-free/webfonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin>';
}
if ( in_array( 'far', $preload_fonts ) ) {
echo '<link rel="preload" href="' . RIODE_ASSETS . '/vendor/fontawesome-free/webfonts/fa-regular-400.woff2" as="font" type="font/woff2" crossorigin>';
}
if ( in_array( 'fab', $preload_fonts ) ) {
echo '<link rel="preload" href="' . RIODE_ASSETS . '/vendor/fontawesome-free/webfonts/fa-brands-400.woff2" as="font" type="font/woff2" crossorigin>';
}
}
if ( ! empty( $preload_fonts['custom'] ) ) {
$font_urls = explode( "\n", $preload_fonts['custom'] );
foreach ( $font_urls as $font_url ) {
$dot_pos = strrpos( $font_url, '.' );
if ( false !== $dot_pos ) {
$type = substr( $font_url, $dot_pos + 1 );
echo '<link rel="preload" href="' . esc_url( $font_url ) . '" as="font" type="font/' . esc_attr( $type ) . '" crossorigin>';
}
}
}
?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div class="page-wrapper" <?php echo riode_page_wrapper_attrs(); ?>>
<?php
get_template_part( RIODE_PART . '/header/header' );
?>
<?php riode_print_title_bar(); ?>
<main id="main" class="<?php echo apply_filters( 'riode_main_class', 'main' ); ?>">