-
AuthorPosts
-
November 21, 2018 at 2:30 pm #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
FrancescaNovember 22, 2018 at 2:48 pm #1036526Hey inkinch,
Could you please attach a mockup of what you’re trying to achieve?
Best regards,
VictoriaNovember 22, 2018 at 10:35 pm #1036805Hi 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 checkThanks
FrancescaNovember 23, 2018 at 4:25 am #1036852November 23, 2018 at 10:27 am #1036903Hi 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
FrancescaNovember 24, 2018 at 8:41 pm #1037284Hi,
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,
MikeNovember 27, 2018 at 12:09 am #1037853Hi 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
November 27, 2018 at 7:29 am #1037923Hi,
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,
MikeDecember 5, 2018 at 8:18 pm #1041364Hi 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
December 6, 2018 at 3:46 am #1041463Hi,
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,
MikeJanuary 5, 2019 at 5:48 pm #1050356Hi 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 menuThanks a lot for the help
January 5, 2019 at 9:46 pm #1050405Hi,
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,
MikeJanuary 10, 2019 at 11:05 pm #1052528Hi 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 helpJanuary 11, 2019 at 12:54 am #1052542Hi,
Please try this css:@media only screen and (max-width: 767px) { #custom_html-2, #custom_html-3 { display: none !Important; } }
Best regards,
MikeJanuary 11, 2019 at 6:26 pm #1052834Hi 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!!
January 12, 2019 at 2:14 am #1052951Hi,
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,
MikeJanuary 12, 2019 at 1:09 pm #1053046Hi 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!!!!
January 12, 2019 at 8:08 pm #1053216Hi,
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,
MikeJanuary 29, 2019 at 11:42 pm #1060239Hi 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.January 31, 2019 at 12:51 am #1060659Hi,
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,
MikeJuly 15, 2019 at 8:44 pm #1118933Hi 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
FrancescaJuly 18, 2019 at 4:09 am #1119758Hi,
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,
MikeJuly 23, 2019 at 10:25 pm #1121274Hi 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
July 23, 2019 at 11:34 pm #1121322Hi,
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,
MikeJuly 24, 2019 at 10:35 am #1121444Hi 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 textadd_filter(‘gettext’, ‘translate_reply’);
add_filter(‘ngettext’, ‘translate_reply’);function translate_reply($translated) {
$translated = str_ireplace(‘Billing’, ‘Your info’, $translated);
return $translated;
}Many thanks
July 24, 2019 at 4:32 pm #1121614Hi,
I adjusted your code to this:add_filter('gettext', 'translate_reply'); add_filter('ngettext', 'translate_reply'); function translate_reply($translated) { $translated = str_ireplace('Billing & Shipping', 'Your info', $translated); return $translated; }
It seems to be working now, please clear your browser cache and check.
Best regards,
MikeJuly 25, 2019 at 11:22 pm #1121998Working perfectly!
Many many thanks!July 26, 2019 at 2:31 am #1122016Hi,
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,
MikeJuly 26, 2019 at 2:32 am #1122017Hi,
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 -
AuthorPosts
- The topic ‘Add widget left and right to the Header’ is closed to new replies.