-
AuthorPosts
-
November 14, 2016 at 5:02 pm #712072
I want to show a short text next to logo. I’m using “logo left, menu below” option in the header settings, so there is plenty of space to show text. I tried this: add-subtext-to-logo-replace-logo-with-site-title, it doesn’t work. The text shows up below the logo and only on mobile, not on desktop.
November 14, 2016 at 5:07 pm #712075Hey!
Can you please post the link to your website?
You would need to add some custom CSS code to display the text next to logo and we can gladly provide you that :)Cheers!
YigitNovember 14, 2016 at 5:26 pm #712085since my site is under construction, there is an ip restriction now. if you can give me your ip address i can add you to exceptions. I’m using your “construction” demo as base, if that helps…
November 14, 2016 at 5:30 pm #712089Hey!
We only login to sites that are publicly accessible. If you could temporarily disable IP restriction, we can quickly look into your site. Otherwise, please post your logo and the code you used here so we can try to reproduce on our local installation :)
Cheers!
YigitNovember 14, 2016 at 5:47 pm #712099I can’t disable the restriction, sorry about that.
code I added to functions.php:add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { $sub .= 'Text next to logo'; return $sub; }
source code:
<div class='container av-logo-container'><div class='inner-container'><strong class='logo'><a href='link.to.my.site/'><img height='100' width='300' src='link.to.my.logo' alt='logo.alt.text' /><span class='subtext'>Text next to logo</span></a></strong></div></div>
I changed the links in the code, sent the image link in private content. I hope this will be enough. thanks for your time :)
to show you what I mean: example
- This reply was modified 8 years, 1 month ago by xtrastr.
November 15, 2016 at 2:30 pm #712489Hi,
Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:
.logo img { float: left; }
Best regards,
YigitOctober 31, 2017 at 3:27 pm #870856Don’t know if this is the right place to jump into the discussions. On my page, the alt tag for the logo is not showing, only the “finger” to mark this is a link. My customer want to have a specific text, which is always showing. So I used the solution code:
add_filter('avf_logo_alt', 'avf_change_logo_alt'); function avf_change_logo_alt($alt) { $alt = "New Alternate Text Here"; return $alt; }
It works, because I see on Page Resource, the alt tag is changed, but still not showing on scrolling over the logo. Could you help me?
Thanks for help, didn’t find a solution by searching
RenéNovember 4, 2017 at 3:59 am #872363Hi,
Please use the following filter instead.
function avf_logo_final_output_mod($logo, $use_image, $headline_type, $sub, $alt, $link) { $title = 'CHANGE THIS TITLE'; $dimension = "height='100' width='300'"; //basically just for better page speed ranking :P $logo = avia_get_option('logo'); $logo = "<img {$dimension} src='{$logo}' alt='{$alt}' title='{$title}' />"; $logo = "<$headline_type class='logo'><a href='".$link."'>".$logo."$sub</a></$headline_type>"; return $logo; } add_filter('avf_logo_final_output', 'avf_logo_final_output_mod', 10, 6);
Change the title as needed.
Best regards,
IsmaelNovember 6, 2017 at 12:25 pm #872999Hi Ismael
thanks for the code. I can now put in the Title I want and the text is visible. Unfortunately, the logo is now not visible anymore (img src is missing). Small mistake in the code, I don’t see?
Thank you for help
René- This reply was modified 7 years, 1 month ago by baiker.
November 7, 2017 at 5:14 am #873537Hi,
Yes, there’s a minor error in the code. We modified it a bit. Please try it again.
Best regards,
IsmaelNovember 7, 2017 at 11:38 am #873613You’re the man, Ismael! Works. Perfect. Thank you very much for your help!
RenéNovember 7, 2017 at 4:41 pm #873794Hi René,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
VictoriaJanuary 4, 2018 at 1:06 am #893014What was the final code that was used? Thanks!
January 4, 2018 at 7:47 am #893148Hi,
This is the final code.
function avf_logo_final_output_mod($logo, $use_image, $headline_type, $sub, $alt, $link) { $title = 'CHANGE THIS TITLE'; $dimension = "height='100' width='300'"; //basically just for better page speed ranking :P $logo = avia_get_option('logo'); if($logo = avia_get_option('logo')) { if(is_numeric($logo)){ $logo = wp_get_attachment_image_src($logo, 'full'); $logo = $logo[0]; } $logo = "<img {$dimension} src='{$logo}' alt='{$alt}' title='{$title}' />"; $logo = "<$headline_type class='logo'><a href='".$link."'>".$logo."$sub</a></$headline_type>"; } return $logo; } add_filter('avf_logo_final_output', 'avf_logo_final_output_mod', 10, 6);
Best regards,
IsmaelJuly 6, 2018 at 10:41 pm #982248Hello,
I Have the same problem. I want to put my e-mailadres and my phonenumber to the right of the logo.
Could you assist me please
Thx
July 7, 2018 at 10:59 am #982372Hi,
Thank you for getting in touch with us. There are two ways to achieve this.
1. Using functions: Try adding the code provided by Ismael in the previous ticket.
2. Using widgets: To create a header widget area from WordPress > Appearance > Widgets and add your text please check this post,Best regards,
VinayDecember 3, 2019 at 11:41 am #1162143Hi friends,
Is there is a function for the text around the logo on the left and right at the same time, or
or existing functionality can be changed :add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { $sub .= '<h1>Company Name</h1>'; return $sub; }
Thanks for advice
December 5, 2019 at 7:26 am #1162820 -
AuthorPosts
- The topic ‘Text next to logo’ is closed to new replies.