Where exactly do i add the code to my header.php?
-
I am currently having issues on where to put the code for the header excatly in the header.php. I have watched the video instruction on this but I dont have that section in my php.
Here is my header.php:<?php
/**
* The Header template for our theme
*
* Displays all of the <head> section and everything up till <div id=”main”>
*
* @package WordPress
* @subpackage Furnilife_Theme
* @since Furnilife 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<?php $furnilife_opt = get_option( ‘furnilife_opt’ ); ?>
<meta charset=”<?php bloginfo( ‘charset’ ); ?>” />
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link rel=”profile” href=”https://gmpg.org/xfn/11″ />
<link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div class=”wrapper <?php if($furnilife_opt[‘page_layout’]==’box’){echo ‘box-layout’;}?>”>
<div class=”page-wrapper”>
<?php if(isset($furnilife_opt[‘header_layout’]) && $furnilife_opt[‘header_layout’]!=”){
$header_class = str_replace(‘ ‘, ‘-‘, strtolower($furnilife_opt[‘header_layout’]));
} else {
$header_class = ”;
}
if(class_exists(‘RevSliderFront’)){
$hasSlider_class = ‘rs-active’;
} else {
$hasSlider_class = ”;
}
?>
<div class=”header-container <?php echo esc_html($header_class).” “.esc_html($hasSlider_class) ?>”>
<div class=”header”>
<div class=”header-content”>
<?php
if ( isset($furnilife_opt[‘header_layout’]) && $furnilife_opt[‘header_layout’]!=””) {
$jscomposer_templates_args = array(
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
‘post_type’ => ‘templatera’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => 30,
);
$jscomposer_templates = get_posts( $jscomposer_templates_args );if(count($jscomposer_templates) > 0) {
foreach($jscomposer_templates as $jscomposer_template){
if($jscomposer_template->post_title == $furnilife_opt[‘header_layout’]){
echo do_shortcode($jscomposer_template->post_content);
}
}
}
} else {
?>
<div class=”header-default”>
<div class=”container”>
<div class=”header-top”>
<?php if( isset($furnilife_opt[‘logo_main’][‘url’]) && $furnilife_opt[‘logo_main’][‘url’]!=”){ ?>
<div class=”logo”><div class=”logo-inner”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”>” alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” /></div></div>
<?php
} else { ?>
<h1 class=”logo site-title”><span class=”logo-inner”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></span></h1>
<?php
} ?>
</div>
<div class=”header-bottom”>
<div class=”nav-container”>
<div class=”horizontal-menu visible-large”>
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘container_class’ => ‘primary-menu-container’, ‘menu_class’ => ‘nav-menu’ ) ); ?>
</div>
</div>
</div>
<?php if ( has_nav_menu( ‘mobilemenu’ ) ) : ?>
<div class=”visible-small mobile-menu”>
<div class=”mbmenu-toggler”><?php echo esc_html($furnilife_opt[‘mobile_menu_label’]);?><span class=”mbmenu-icon”><i class=”fa fa-bars”></i></span></div>
<?php wp_nav_menu( array( ‘theme_location’ => ‘mobilemenu’, ‘container_class’ => ‘mobile-menu-container’, ‘menu_class’ => ‘nav-menu’ ) ); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php
}
?>
</div>
</div>
<div class=”clearfix”></div>
</div>The page I need help with: [log in to see the link]
- The topic ‘Where exactly do i add the code to my header.php?’ is closed to new replies.