[Support request] Alt text for Logo.

Home Forums Support [Support request] Alt text for Logo.

Home Forums Support Alt text for Logo.

  • This topic has 3 replies, 4 voices, and was last updated 12 months ago by Ying.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #2284305

    Hi there –

    I’m having issues trying to modify the alt text for my website’s logo. I’ve tried all the filters suggested here, adding them into Snippets: https://generatepress.com/forums/topic/site-logo-alt-tag-filter/ but the logo’s alt text still just shows the site title.

    Any help would be much appreciated!

    Customer Support

    Hi there,

    this is the correct filter:


    If you have page caching – try clearing that after adding it.
    If still an issue it may be because you have a plugin that is switching the images to webP and that may be interfering.


    Hi David,

    generate_logo_title changes both the title and alt attributes.

    We are hoping to make the title and the alt text to be a different.


    Customer Support

    Hi Kale,

    You can try generate_logo_output filter, you can replace the my alt text and my logo title:

    add_filter( 'generate_logo_output','tu_logo_atts', 10, 2 ); 
    function tu_logo_atts( $output, $logo ) {
    		'<div class="site-logo">
    			<a href="%1$s" title="my logo title" rel="home" alt="my alt text">
    						<img class="header-image" src="%2$s" alt="my alt text" title="my logo title" />
    		esc_url( apply_filters( 'generate_logo_href' , home_url( '/' ) ) ),
    		esc_url( apply_filters( 'generate_logo', $logo ) )
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.