[Resolved] How to change navigation logo alt?

Home Forums Support [Resolved] How to change navigation logo alt?

Home Forums Support How to change navigation logo alt?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #917915
    Giuseppe

    I would like to know, how to change alt tag of my main navigation(sticky+static) logo.
    Thanks

    #917975
    Leo
    Staff
    Customer Support

    Hi there,

    This filter should help:
    https://docs.generatepress.com/article/generate_logo_output/

    Let me know 🙂

    #918429
    Giuseppe

    Hi Leo,

    I read the documentation you linked to me but I don’t understand how to change the ALT of the logo.

    I found a old topic where Tom explained this way :

    “You can try this filter: generate_logo_title”

    add_filter( 'generate_logo_title', 'tu_change_logo_alt' );
    function tu_change_logo_alt() {
        return 'Your alt title';
    }

    This is the topic https://generatepress.com/forums/topic/how-to-change-navigation-logo-alt/

    Could you explain me better what I should do to change the ALT tag?

    thanks

    #918570
    David
    Staff
    Customer Support

    Hi there,

    add that function to your child themes function file or by using the code snippets plugin.
    Then edit the return 'Your alt title'; to contain your alt title.

    #918593
    Giuseppe

    Hi David

    then I go in Dashboard/Appearance/Theme Editor and then enter in the file functions.php this code :

    add_filter( 'generate_logo_title', 'tu_change_logo_alt' );
    function tu_change_logo_alt() {
        return 'Your alt title';
    }

    putting the name of the alt title in this point :
    return ‘Your alt title’

    It’s correct?

    Thanks

    #918595
    David
    Staff
    Customer Support

    Yes you can but only on your Child Theme not the parent theme as any changes to this will be lost when the them updates.

    More info here on using a Child Theme:

    https://docs.generatepress.com/article/using-child-theme/

    If you don’t have one then install the Code Snippets plugin and add the code there.

    #919088
    Giuseppe

    Hi David,

    I solved with your directions

    Thanks

    #919273
    David
    Staff
    Customer Support

    Glad to be of help.

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