• Resolved emmanuelad

    (@emmanuelad)


    Hi everyone!

    I would like to create a whole new header using HTML and WordPress functions/hooks, like this:

    <header id="masthead" <?php generate_do_element_classes( 'header' ); ?> <?php generate_do_microdata( 'header' ); ?>>
      <div <?php generate_do_element_classes( 'inside_header' ); ?>>
        <div class="site-logo">
          <a href="<?php get_bloginfo('url') ?>" title="<?php get_bloginfo() ?>" rel="home">
            <img class="header-image lazyloaded" alt="SITE TITLE" src="<?php get_custom_logo() ?>" title="<?php get_bloginfo() ?>" data-lazy-src="<?php get_custom_logo('url') ?>">
          </a>
        </div>
      </div>
    </header>

    But it’s not working, any help?

    I’m using GP child theme.

    Thanks!

    • This topic was modified 4 years, 6 months ago by emmanuelad.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter emmanuelad

    (@emmanuelad)

    I got it!

    <header id="masthead" <?php generate_do_element_classes( 'header' ); ?> <?php generate_do_microdata( 'header' ); ?>>
      <div <?php generate_do_element_classes( 'inside_header' ); ?>>
        <div class="site-logo">
          <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo(); ?>" rel="home">
            <img class="header-image lazyloaded" alt="<?php bloginfo(); ?>" src="<?php
              $custom_logo_id = get_theme_mod('custom_logo');
              $image = wp_get_attachment_image_src($custom_logo_id , 'full');
              echo $image[0];
              ?>" title="<?php bloginfo(); ?>" data-lazy-src="<?php
              $custom_logo_id = get_theme_mod('custom_logo');
              $image = wp_get_attachment_image_src($custom_logo_id , 'full');
              echo $image[0];
            ?>">
          </a>
        </div>
      </div>
    </header>
    • This reply was modified 4 years, 6 months ago by emmanuelad.

    Glad to hear you found a solution

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom header in child theme’ is closed to new replies.