[Resolved] Display logo anywhere in theme with GP code snippet

Home Forums Support [Resolved] Display logo anywhere in theme with GP code snippet

Home Forums Support Display logo anywhere in theme with GP code snippet

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1138279
    Sam

    Hi GP team. Looking for a code snippet that outputs the site logo that’s been set/uploaded in Customizer.

    Use case: I want to display the site logo in a footer text widget above social links and contact info, etc. My plan is to create shortcode [get_the_logo] with this code so I can simply include the shortcode in my footer’s text widget.

    #1138321
    Sam

    Edit: Resolved!

    I should’ve known it already exists – generate_construct_logo(). Found it in /inc/structure/header.php

    Using this for my shortcode and then targeting with CSS (looks like ‘header-image’ class is automatically applied):

    add_shortcode( 'get_the_logo', 'gpsl_get_the_logo' );
    
    function gpsl_get_the_logo() {
    	generate_construct_logo();
    }
    
    #1138376
    Leo
    Staff
    Customer Support

    Hi there,

    So this issue is resolved?

    Let me know ๐Ÿ™‚

    #1138381
    Sam

    Yes, resolved. Thanks for confirming, Leo.

    #1138410
    Leo
    Staff
    Customer Support

    Awesome!

    Glad you were able to find a solution ๐Ÿ™‚

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