Archived topic
Display logo anywhere in theme with GP code snippet
4 replies · Started by Sam on January 20, 2020
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.
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();
}
Hi there,
So this issue is resolved?
Let me know :)
Yes, resolved. Thanks for confirming, Leo.
Awesome!
Glad you were able to find a solution :)