Changing mouseover Alt-tag for header image

  • brentwz

    #5511

    Sorry to ask the obvious, but where do I go to change the Alt-tag that displays on the header image?

    With Graphene, we can set the header image to be linked to the homepage in Header Display Options, & we always do. But I don’t recall ever seeing where I can set the Alt-tag to be anything a bit more chatty than the preset “Go back to the front page”.

    Syahir, please point me in the right direction to edit it. Thanks muchly.

    Prasanna SP

    #32102

    Add this to your child theme’s functions.php file. (Put this anywhere between opening and closing php tags)

    function graphene_filter_gettext( $translated, $original, $domain ) {
    $strings = array(
    'Go back to the front page' => 'You wanna start the tour from home page again?',
    );
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
    }
    add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );

    Change You wanna start the tour from home page again? to whatever you want. It will be shown instead of Go back to the front page.

    brentwz

    #32103

    Thanks for replying, Prasanna. You make it sound very straightforward!

    I’ll have some free time tomorrow (Sunday) to follow your directions, including setting up a child theme to suit (as per http://docs.graphene-theme.com/Customisation_using_a_child_theme).

    Shall post back here when done.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.