Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account?Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress,GenerateBlocks).

Want to become a premium user? Learn more below.

Replace site logo with widget element.

  • forum.worldhealth.net – we figured out how to develop our animated logo so that it doesn’t take up a lot of space, but now we’d like to move it from the right sidebar to replace the site logo. Any way we can do this with elements?

    https://forum.worldhealth.net/news/vigorous-exercise-may-preserve-cognition/

  • Hi there,

    Try using this filter, and replaceimages HTML herewith the images.

    add_filter( 'generate_logo_output', 'tu_logo_class', 10, 3 );
    function tu_logo_class( $output, $logo_url, $html_attr ) {
    printf(
    '<div class= "site-logo" >
    <a href= "%1$s" title= "%2$s" rel= "home" >
    <figure class= "aligncenter size-full kb-image-is-ratio-size" ><div class= "kb-is-ratio-image kb-image-ratio-square" >images HTML here</div></figure>
    </a>
    </div>',
    esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ),
    esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ),
    $html_attr
    );
    }
  • Hey, thank you for the prompt reply – this is not exactly what I was looking for. We want to put a custom widget in place of the site-logo. The animated logo uses two images, one for an image widget which css animation is applied so it can rotate, then a custom background image is defined in CSS to remain stationary. That’s the globe.

    Sorry, I didn’t get an email showing your reply or I looked over it. Will check more frequently since you are very responsive!

  • Hi there,

    Would you be able to rebuild the animating logo using a block element? If so, we can try to determine the best method, such as using a hook or something else to use it as a site logo.

  • Sounds like a plan, let me do that and I’ll check back in – most likely later today. Please keep this topic open until we can resolve. We love GeneratePress and use it on ALL websites

  • No problem, let us know how you get on

  • I got it, thank you for the help – I just had to remake the whole header as an element and it came out looking great!https://forum.worldhealth.net

    The best I can tell, this animated logo does not impact loading times at all – it’s literally just a png with css animation and another background png. We’ll see…

  • Looks great indeed! I’m glad you managed to sort it out 😀

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