Tagged: ,

Viewing 29 posts - 1 through 29 (of 29 total)
  • Author
    Posts
  • #1036067

    Hi,
    I’m using Enfold, with header set: Logo entered and menu below.
    I would like to add an address on the left of the logo and a button on the right, in the header section, same alignment of the logo.
    I’m trying to follow the Enfold Docs but I’m totally lost on how to “Add the JS and PHP scripts to your child theme functions.php file”
    Can you please help me with that?
    Thanks
    Francesca

    #1036526

    Hey inkinch,

    Could you please attach a mockup of what you’re trying to achieve?

    Best regards,
    Victoria

    #1036805

    Hi Victoria,

    sure, I want to do the same as per https://www.the-ivy.co.uk.
    As you can see there is an address on the left of the logo and a button on the right.
    I know you can activate widget for the header in enfold, and I found an article that explain how to do that, but it is not very clear.
    Can you help me with that?
    My website is still not online (at the moment I have a “Coming soon” page), but I can give you the credentials if you want to check

    Thanks
    Francesca

    #1036852

    Hi,
    Please include a admin login in the Private Content area so we can assist. Please ensure that the WordPress > Appearance > Editor menu option is available so we can add a function to your functions.php
    2018-11-22-212423

    Best regards,
    Mike

    #1036903

    Hi Mike,
    thanks a lot. I’ve added the credential in the private content.
    What I was trying to follow is the article below, but It’s a bit confusing once you get to the point of the JS and PHP scripts.

    Thanks a lot
    Francesca

    #1037284

    Hi,
    Sorry for the late reply, I found that I needed to change this a little from the instructions on the post you found, so the css I added to your WordPress > Customize > Additional CSS is:

    #header_main.container_wrap_logo {
    display: flex !important; 
    }
    .container_wrap_logo .av-logo-container {
    width: 32% !important; 
    display: inline-flex !important; 
    order: 2 !important;
    padding: 0px !important; 
    }
    .container_wrap_logo .widget:first-child {
    width: 32% !important; 
    display: inline-flex !important;
        justify-content: center;
        align-self: center;
        align-items: center;
    order: 1 !important; 
    }
    .container_wrap_logo .widget:nth-child(2) {
    width: 32% !important; 
    display: inline-flex !important;
    order: 3 !important; 
        justify-content: center;
        align-self: center;
        align-items: center; 
    }
    #header_main_alternate {
       border-bottom-width: 1.5px;
       border-bottom-style: solid;
    }
    @media only screen and (max-width: 767px) { 
    nav.main_menu {
        top: 70px !important; 
        right: -70% !important; 
    }
    .logo a img {
    float:right !important;
    }
    }

    and the script I added to your functions.php:

    
    function custom_script(){
      ?>
      <script>
       jQuery(window).load(function(){
        jQuery( '#header_main_alternate' ).insertAfter( '.container_wrap_logo' );
        });
      </script>
      <?php
      }
      add_action('wp_footer', 'custom_script');
    

    Please clear your browser cache and check.
    I left the widgets in place so you could see how to add you info in them, please adjust to suit.

    Best regards,
    Mike

    #1037853

    Hi Mike,

    thanks a lot for this! It looks perfect!
    Just a final question: I see that the widget are now “custom html”. If I want to transform the text on the right in a button, can I just insert in the widget the html code for the button?

    Thanks again

    #1037923

    Hi,
    Yes, the “custom html” widget supports the code for buttons.
    Unless there is anything else we can assist with on this issue, shall we close this then?

    Best regards,
    Mike

    #1041364

    Hi Mike,

    thanks a lot for this and really sorry for the late reply.
    Yes, I think it is all for the header. Can I ask you another quick help? I want to reduce the line space between text in a block text.
    I’ve tried using the custom css

    .avia_textblock {
    line-height: 1em
    }

    But it seems to affect also the normal text. Is there a way to change only the block text? I have two buttons in the “reservation” page with a text block and as you can see there is a wide space between the lines.

    Thanks again for the amazing support

    #1041463

    Hi,
    Do you mean a text block in the header widget area, or somewhere else?
    It seems that most of your text is in a text block element on your site, so to change the line height for only certain text block elements you will want to add a custom class to the by ensuring that the box is checked at: Enfold Theme Options > Layout Builder > Show element options for developers then the custom class box will show when editing it.
    Then your css would look like this:

    .avia_textblock.custom_class  {
    line-height: 1em !important; 
    }

    Best regards,
    Mike

    #1050356

    Hi Mike,
    Happy New Year!
    I’m using the same chat as I need an help with the same header, this time in the mobile version.
    The website is online, and you can see that in the mobile version the burger menu is under the header. Is that possible to move it up? Classic top right position next to the logo?
    I won’t have any widget on the side of the logo in the mobile version, just the logo and the burger menu

    Thanks a lot for the help

    #1050405

    Hi,
    Happy New Year to you too :)
    I adjusted your css to move the burger icon up to centered next to your logo when it’s in mobile view, but I noticed that this left the content of each page with a top padding of 50px, so it was down a little far.
    If you agree, then you could add this css to remove that padding from the mobile view:

    @media only screen and (max-width: 767px) { 
    main.template-page.content {
    padding-top: 0px !important;
    }
    }

    Please clear your browser cache and check.

    Best regards,
    Mike

    #1052528

    Hi Mike,

    thanks a lot for this. It’s exactly what I was looking for!
    Last question: I’m trying to hide the address and the button in the header when I’m in mobile mode.
    You can see the website online, the address on the left and the button on the right of the logo are perfect in the desktop version, but they don;t work in mobile. The best solution it’s just not having them in the mobile version.

    I’ve been trying to use the css:
    @media only screen and (max-width: 767px)
    .header_main_alternate
    {display: none! Important:}

    But it doesn’t work. Any suggestion?
    Thanks again for your super useful help

    #1052542

    Hi,
    Please try this css:

    @media only screen and (max-width: 767px) {
    #custom_html-2, #custom_html-3 {
    display: none !Important;
    }
    }

    Best regards,
    Mike

    #1052834

    Hi Mike,

    thanks a lot! It worked perfectly!
    Not sure if you have noticed it but, when you change pages, for a couple of second, the menu appears on the left side of the header, next to the logo.
    I’ve tried to understand why and if that’s a problem of cache or anything else.
    Do you have any ideas?

    Thanks again! You gave me an incredible support!!

    #1052951

    Hi,
    I took a look at your site and tried going to different pages to see this error, but I couldn’t recreate it.
    I see that you are not merging the site’s css or js, so that can’t be causing a error.
    Perhaps your webhost is caching at the server level, please ask them or check your webhost options for a way to clear the server cache.
    Please let us know if this continues and I will ask for the rest of the team to take a look. If you could create a video of the error that would be nice. There are some Android apps that will do this, and I’m sure there must be a Apple app if you have a iPhone.

    Best regards,
    Mike

    #1053046

    Hi Mike,

    I took a video. it’s getting quicker and quicker now, and it is not showing in all the pages. It was way more visible yesterday, for some reasons. It’s not a big deal, it was mostly a curiosity.
    Below the link for the video, check on the left side of the header, next to the logo, where at the moment we have the address. You can see that for a second when you change page, you can see the menu.

    https://drive.google.com/open?id=1Zm493V1NqrUN1rdl2jQ3DJy58DXyN0Ff

    Thanks for all your support so far!!!!

    #1053216

    Hi,
    Thank you for the video, I had only been looking at the mobile version and now I see the issue on the desktop version.
    I believe this is due to the speed that your site is loading the css files.
    I checked all of your css from the WP Customizer and the Quick CSS and found a couple of small errors and combined all of it into your child theme, then I enabled your SG Optimizer, which seems to be your control for your server cache.
    I expect that once your server cache is built it should load quicker and you would not see this.

    Best regards,
    Mike

    #1060239

    Hi Mike,
    Sorry to bother you.
    The website is online and I noticed that the menu still appears under the “button” in the header once you open the website and change pages. It does that with all the different browser. I tried it with different computers and the problem is still there.
    This is not happening with the mobile version, so my question is: is this related to the new “widget” header?
    I’ve attached a video.

    #1060659

    Hi,
    Sorry for the late reply, This does look like the css for the header is taking a little extra time to load, I was sure once the page was caching that it would load fast enough that we would not see this.
    I see that in your functions.php you were calling a css file “my_custom.css” to replace the parent css, but the file was empty, so I disabled this because I thought it was causing the extra load time, but it didn’t help.
    I tried the Enfold Theme Options > Page Preloading option and it hides the error with the site logo, Please clear your browser cache and check if this is acceptable.

    Best regards,
    Mike

    #1118933

    Hi Mike,
    I would need your help :)
    I opened a post about delivey option for a restaueant website but I didn’t receive any reply.
    I need to add a take away menu on a restaurant website http://www.pagliaefieno.co.uk (enfold theme) with the option of checking the postcode and deliver to the client.
    I see that enfold restaurant has an online shop but there is no integration with any address checker.
    The pluging for woocommerce is apparently not working with my wordpress (for no apparent reason as I have WP 5).
    Do you have any suggestion to solve this?
    Many thanks
    Francesca

    #1119758

    Hi,
    Perhaps you could use this plugin: Service Area Postcode Checker with woocommerce.
    Perhaps you could use a popup to ask the visitor to check their address.

    Best regards,
    Mike

    #1121274

    Hi Mike,
    Thanks for this.
    I think I managed to do that adding a trigger and a couple of plugins.
    Can you help me with a css to hide the button “vie cart”?
    On the shop page, I just want the button “Checkout” and not the “view cart”.
    I’ve tried several css but no one seems working.

    Many thansk

    #1121322

    Hi,
    Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    a.button.wc-forward {
    display: none !important;
    }
    a.button.checkout.wc-forward {
    display: block !important;
    }

    Best regards,
    Mike

    #1121444

    Hi Mike,
    thanks a lot!
    Excellent help as usual! Working perfectly!

    One last question: I want to change the text “Billing&Shipping” in the checkout page with “your info”.
    I added a code in the PHP but it seems to change either the word Shipping or the word Billing but not both of them.
    Any suggestions on how to do that?

    The code I’ve added so far is:
    // change Billing text

    add_filter(‘gettext’, ‘translate_reply’);
    add_filter(‘ngettext’, ‘translate_reply’);

    function translate_reply($translated) {
    $translated = str_ireplace(‘Billing’, ‘Your info’, $translated);
    return $translated;
    }

    Many thanks

    #1121614

    Hi,
    I adjusted your code to this:

    add_filter('gettext', 'translate_reply');
    add_filter('ngettext', 'translate_reply');
    
    function translate_reply($translated) {
    $translated = str_ireplace('Billing &amp; Shipping', 'Your info', $translated);
    return $translated;
    }
    

    It seems to be working now, please clear your browser cache and check.

    Best regards,
    Mike

    #1121998

    Working perfectly!
    Many many thanks!

    #1122016

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

    #1122017

    Hi,
    Oops, wrong button :)
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 29 posts - 1 through 29 (of 29 total)
  • The topic ‘Add widget left and right to the Header’ is closed to new replies.