Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #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.
    #594355

    Hi #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.

    #594449

    Thank you for your answer,

    please allow me one more question: where can I place the CSS-Code?

    #594451

    Hey!

    Please go to Enfold theme options > General Styling and add it to Quick CSS field

    Best regards,
    Yigit

    #911165

    Hello,
    How can I wrap my logo width <h1> only on my home page ?
    Thanks

    #911275

    Hi,

    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,
    Yigit

    #911373

    I’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

    #911607

    Hi pixeet2016,

    What is the point of wrapping an image with the h1 tag? Can you explain a bit more, please?

    Best regards,
    Victoria

    #911639
    This reply has been marked as private.
    #911713

    Hi pixeet2016,

    Do you have a test server where you can have this display on? Or this is the test server?

    Best regards,
    Victoria

    #911719

    Hi VIctoria,
    I have a local server, this adress is a preprod server, so i can test on preprod and on my local server.

    #911723

    But I prefer let the preprod adress without bug because my client can see it.
    The only thing that i can say is that the function

    add_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 ?

    #912069

    Hi 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,
    Victoria

    #912168
    This reply has been marked as private.
    #912173
    This reply has been marked as private.
    #912186
    This reply has been marked as private.
    #912579

    Hi,

    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

Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.