Site logo

[Resolved] the_custom_logo not working in element hook

Home Forums Support [Resolved] the_custom_logo not working in element hook

Home Forums Support the_custom_logo not working in element hook

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2200494
    Sebastian

    Hey guys,

    I would like to insert a custom topbar with custom content inside. One of the contents is the site logo, however I don’t succeed to simply echo the_custom_logo(). I’ve also tried doing this, inserting the fetched url into an img tag:

    $custom_logo_id = get_theme_mod( 'custom_logo' );
    $image = wp_get_attachment_image_src( $custom_logo_id , 'full' );
    echo $image[0];
    

    But that didn’t work either. Is running the_custom_logo() not possible anymore? I found this post suggesting this can be done.

    Btw, my logo is an svg with no styling set to it.

    This is the complete code I’m trying to enforce in the hook element:

    <div class="itc-topbar">
          <div class="grid-container">
            <div class="itc-row vert-center">
              <div class="itc-col-4">
                <a href="tel:0700000000" class="itc-topbar__phone-nbr">
                  <ul class="list--no-m list--no-bullet">
                    <li class="icon phone">0700 - 000000</li>
                  </ul> 
                </a>
              </div>
              <div class="itc-col-4">
                <?php the_custom_logo(); ?>
              </div>
              <div class="itc-col-4">
                <a href="#" class="btn rounded btn--violet btn--regular">Log in</a>
              </div>
            </div>
          </div>
        </div>

    Thanks

    #2200499
    Sebastian

    I noticed the image actually is echoed out but it’s 1×1 px in size. Sorry for that.

    #2200503
    David
    Staff
    Customer Support

    Hi there,

    glad to hear you found the issue!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.