-
AuthorPosts
-
March 7, 2016 at 2:47 pm #594328
Hi,
I have uploaded a logo for my website (2200x150px) and I would like to display it on top of my site. The standard logo size is 340px * 156px. First I set “Logo center, Menu below” in the Header Layout preferences pane. Unfortunately I only can set the height of the logo, but not the width. The logo is displayed in 340x156px. How can I set the width of the logo in CSS and where can I place the CSS-code?
Best regards,
Holger
- This topic was modified 8 years, 9 months ago by cloudsearcher.
March 7, 2016 at 3:22 pm #594355Hi #cloudsearcher ;
With these lines of code you can have a full-width logo in the header, don’t forget to set the size of your header in the Header Layout (156px)..html_header_top.html_logo_center .logo{padding: 0px !important; width: 100% !important;height: 100% !important;} .logo img{width: 100% !important;height: 100% !important;}
(!) You should check how you would like to show the logo on mobile devices.
March 7, 2016 at 5:15 pm #594449Thank you for your answer,
please allow me one more question: where can I place the CSS-Code?
March 7, 2016 at 5:16 pm #594451Hey!
Please go to Enfold theme options > General Styling and add it to Quick CSS field
Best regards,
YigitFebruary 12, 2018 at 4:19 pm #911165Hello,
How can I wrap my logo width <h1> only on my home page ?
ThanksFebruary 12, 2018 at 7:16 pm #911275Hi,
Please add following code to bottom of functions.php file in Appearance > Editor
add_filter( 'avf_logo_headline', 'change_logo_to_h1', 10); function change_logo_to_h1() { if(is_home()){ return "h1"; }}
Best regards,
YigitFebruary 12, 2018 at 9:33 pm #911373I’m sorry but it does not work. On the home page no h1 added and code appears directly on the site. Can you test your code and come back to me with a solution? thank you in advance
February 13, 2018 at 11:05 am #911607Hi pixeet2016,
What is the point of wrapping an image with the h1 tag? Can you explain a bit more, please?
Best regards,
VictoriaFebruary 13, 2018 at 11:55 am #911639This reply has been marked as private.February 13, 2018 at 3:20 pm #911713Hi pixeet2016,
Do you have a test server where you can have this display on? Or this is the test server?
Best regards,
VictoriaFebruary 13, 2018 at 3:35 pm #911719Hi VIctoria,
I have a local server, this adress is a preprod server, so i can test on preprod and on my local server.February 13, 2018 at 3:39 pm #911723But I prefer let the preprod adress without bug because my client can see it.
The only thing that i can say is that the functionadd_filter( 'avf_logo_headline', 'change_logo_to_h1', 10); function change_logo_to_h1() { if(is_home()){ return "h1"; }}
doesn’t work.
So can you help me ?February 14, 2018 at 3:39 am #912069Hi pixeet2016,
What you uneed to do is to modify the file below
/wp-content/themes/enfold/framework/php/function-set-avia-frontend.php. The function starts around line 484.If you need further assistance please let us know.
Best regards,
VictoriaFebruary 14, 2018 at 10:12 am #912168This reply has been marked as private.February 14, 2018 at 10:24 am #912173This reply has been marked as private.February 14, 2018 at 11:07 am #912186This reply has been marked as private.February 15, 2018 at 3:10 am #912579Hi,
Thank you for the update. Please replace the filter with this.
//wrap logo width h1 (SEO RECOMMANDATIONS) add_filter( 'avf_logo_headline', 'change_logo_to_h1', 10, 1); function change_logo_to_h1($headline) { $headline = is_front_page() ? 'h1' : $headline; return $headline; }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.