wordpress-theme / header.php
header.php
Raw
<!DOCTYPE html>
 <html lang="en">
 <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php
            if (is_front_page()) {
                echo 'HotelPalm ';;
            }
            else {
                wp_title(' | ', true, 'right');
                bloginfo("website");
            }
        ?></title>   
    <link rel="stylesheet" href="<?= bloginfo('stylesheet_url'); ?> ">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <?php wp_head(); ?>
 </head>
 <body>
    <header id="main-header">
        <div class="logo">
            <a href= <?= get_home_url()?>> <img src="<?= get_template_directory_uri();?>/hotelLogo.png" alt="logotyp"></a>
        </div>
        <!-- MENU for large screen  -->
        <nav id="navbar">
        <?php wp_nav_menu(array('theme_location' => 'hotel-main-menu')); ?>  
        </nav>
        <!-- MENU for Small screen  -->
        <nav id="sidebar" class="sidebar">
        <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
        <?php wp_nav_menu(array('theme_location' => 'hotel-main-menu')); ?>
        </nav>
        <div id="hamgurBtn">

            <button class="openbtn" onclick="openNav()"> &#9776; </button>
        </div>

        <?php if(is_front_page() ) { ?>
        <div class="banner">
            <img alt="" src="<?php header_image(); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>">
        </div>
        <?php } ?>
    </header>
    <main class="container">