Hi,
i added a text-logo instead of logo-image in functions.php:
// function - Text Logos
//-------------------------------
add_filter('avf_logo_subtext', 'kriesi_logo_addition');
function kriesi_logo_addition($sub) {
$sub .= "My Name";
return $sub;
}
How can i add an alt-text like ” My Name” to it?
kind regards Jak
Hi!
Thank you for the inquiry.
Go to the Media > Library panel, look for the logo image, then specify the alt text in the Alternative Text field. This will be automatically used as the alt text for the logo.
Regards,
Ismael
Hi Ismael,
i removed the logo image?
kind regards Jak
Got it, thanks!
Hi,
Thanks for the update. Please let us know if you should need any further help on the topic, or if we can close it.
Best regards,
Rikard
you can use on $sub html tags . f.e.:
function kriesi_logo_addition($sub)
{
$sub .= "<span class='logo-title'>";
$sub .= get_bloginfo( 'name', 'display' );
$sub .= "</span>";
$sub .= "<span class='logo-title logo-subtitle'>";
$sub .= get_bloginfo( 'description', 'display' );
$sub .= "</span>";
return $sub;
}
add_filter('avf_logo_subtext', 'kriesi_logo_addition');
and if you can insert classes that way – you can have here alt and title too.
btw:
The required alt attribute specifies an alternate text for an image, if the image cannot be displayed.
The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).