Header is not displaying on certain pages of wordpress theme [closed]

I guess the problem relies on the header.php file. head tag doesn’t support a div or img. However, browsers like Chrome autocorrect the issue by moving the div from head to body.

The header logo is working on the front-page because you set a relative path for the logo. So when you are on the homepage, the logo URL becomes yoursite.tld/img/pmflogolandscapedemo_crop.png. Maybe the logo exists there. But when you visit an archive page, the logo URL becomes yoursite.tld/{archive-url}/img/pmflogolandscapedemo_crop.png where the image doesn’t exist.

On the header.php file, you may try this.

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
    <head>
            <?php wp_head(); ?>
    </head>
<body <?php body_class(); ?>>
<header>
<div class="logo">
    <img class="logo" src="<?php echo get_template_directory_uri(); ?>/img/pmflogolandscapedemo_crop.png" width="100%" alt="">
</div>
<div class="container">
    <?php
    wp_nav_menu(
        array(

            'theme_location' => 'top-menu',
            'menu_class'     => 'navigation',

        )
    );
    ?>
</div>

</header>

get_template_directory_uri() will return the URI to current theme’s template directory. So if you put the image within the img directory of the active theme, the image will load on all the pages.