Archived topic
Animated CSS Logo
3 replies · Started by Simon on October 30, 2020
Hi everyone,
I've successfully followed the steps here https://generatepress.com/forums/topic/replace-logo-with-animated-logo-though-shortcode/ to insert a small animated logo into my website header on desktop and mobile views. I have a static .svg showing on the desktop sticky header but I'm struggling to do the same with the mobile sticky header. Can you offer any guidance on this please?
All the best
Simon
Hi there,
You could try this:
add_filter( 'generate_mobile_header_logo_output', function( $output ) {
return sprintf(
'<div class="site-logo mobile-header-logo">
<a href="%1$s" title="%2$s" rel="home">
YOUR LOGO HTML HERE
</a>
</div>',
esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ),
esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) )
);
} );
Let me know :)
Perfect, thank you!
You're welcome :)