Tagged: Text under logo
-
AuthorPosts
-
September 10, 2021 at 11:18 am #1320365
Hi support,
Id like to add a piece of text undernath the logo of my website. I have tried to use this code:
add_filter(‘avf_logo_subtext’, ‘kriesi_logo_addition’);
function kriesi_logo_addition($sub) {
$sub .= ‘<h1>Company name</h1>’;
return $sub;
}
But the text is not visible but in the source code it is visible.
For my needs i need to do the following:
Firstly i need to make the text visible.
Secondly i would like the text to be H1 only on the home page and on all the other pages id like it to be a paragraph as shown in the linked images in the private content area from one of my competitors.
I will also give you access to my wp-admin incase you need it for troubleshooting.
Thanks in advance,
NickSeptember 11, 2021 at 11:45 pm #1320541Hey nickthe,
Thank you for your patience and for the screenshots, but I don’t think that you gave us access to the correct site as I don’t see the filter above in your functions.php and the logo doesn’t match the screenshots, please check.
To answer your request, try adding this code to your functions.php instead:add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { if( is_front_page() ){ $sub .= "<h1 class='logo-title logo-subtitle'>"; $sub .= "Company Name"; $sub .= "</h1>"; }else{ $sub .= "<span class='logo-title logo-subtitle'>"; $sub .= "Company Name"; $sub .= "</span>"; } return $sub; }
and add this code in the General Styling ▸ Quick CSS field or in the WordPress ▸ Customize ▸ Additional CSS field:
#top .logo, #top .logo a { overflow: visible; } #top .logo-subtitle { color: #aaa !important; font-size: 18px !important; top: 30px !important; position: absolute; white-space: nowrap; } #top h1.logo-subtitle { line-height: 90px; margin-bottom: 0; }
then clear your browser cache and check.
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.