-
AuthorPosts
-
May 17, 2015 at 10:00 pm #445448
Hello,
I am always very impressed with the Enfold theme you all have created.
I am migrating a site from another theme to Enfold and I want to add custom code to the header. I am using the “Logo left, Menu below” for menu and logo position and “Secondary Menu in top bar at the right” for Header Secondary Menu.
I would like to place the custom code across from the logo, right aligned. I am using a child theme and am uncertain if this should be edited in a child theme copy of header.php or elsewhere?
I should clarify that the custom code is a username and password login that directs the user to a different site. As we are migrating the site from another theme, the necessary custom code already exists.
Thanks!
- This topic was modified 9 years, 7 months ago by blueunderground. Reason: Updating domain references
May 18, 2015 at 6:35 pm #445940Hey blueunderground!
Try this out, http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/.
Cheers!
ElliottMay 19, 2015 at 5:35 pm #446591Hi Elliott!
Thanks, I followed the instructions and that does allow the login to be placed. Now we need to re-position it.
The login needs to be above the main menu, not below (as it is currently). What needs to be done to place the login above the main menu?
It should not be a negative margin because the current placement associates the login with the menu and it collapses (with the menu) at lower resolutions.
Thanks!
May 19, 2015 at 5:39 pm #446596Hey!
Can you please apply the changes Elliott suggested and then let us know so we can see the positioning to provide you custom CSS code to fix it?
Regards,
YigitMay 19, 2015 at 5:47 pm #446604This reply has been marked as private.May 19, 2015 at 6:05 pm #446612Hi!
Do you mind creating a temporary admin login and posting it here privately?
Best regards,
YigitMay 19, 2015 at 6:19 pm #446622This reply has been marked as private.May 19, 2015 at 6:32 pm #446633This reply has been marked as private.May 19, 2015 at 6:55 pm #446640Hey!
Changes are done. Please review your website now. Please disable shrinking header option in Enfold theme options > Header > Header Behaviour
Cheers!
YigitMay 19, 2015 at 8:24 pm #446682Nice work Yigit! Thank you for doing that.
Is there any way to prevent the login are from minimizing below the 990px resolution the same way the main menu does?
May 19, 2015 at 8:41 pm #446693This reply has been marked as private.May 21, 2015 at 9:28 am #447621Hello,
I am following up on my note from Tuesday. Nice work Yigit! Thank you for doing that. Per your instructions I have disabled the shrinking header option in the Enfold theme options.
Unfortunately the login element we have added disappears when the browser resolution is below the 990px. The implementation is based on Elliott’s suggestion in this thread on 5/18.
How do we to prevent the login area from disappearing when the browser resolution minimizes the login element below the 990px resolution? While the main menu minimizes (as it should) the login just disappears. Is there a way to fix this or another way to add the login element to the header so it won’t disappear?
Ultimately I would like to be able to control the break-point for how long it is visible.
Please advise
I very much appreciate your help with this!
Thanks!!!
- This reply was modified 9 years, 7 months ago by blueunderground. Reason: remove privacy
May 23, 2015 at 2:02 am #448805Hi!
Use the following code:
@media only screen and (max-width: 989px) { /* Disable hiding header main container */ .responsive.html_mobile_menu_tablet #header_main_alternate{ display:block; } /* Hide menu */ .responsive.html_mobile_menu_tablet #header_main_alternate .main_menu{ display:none; } /* Restore widget top position */ #header .textwidget{ top: -0px; } } @media only screen and (max-width: 767px) { /* Make login full width */ .user-login{ max-width: 100%; } }
It’s commented so you can merge it with your actual code.
Regards,
JosueMay 23, 2015 at 3:56 am #448851This reply has been marked as private.May 23, 2015 at 4:09 am #448858Hi!
That seems to be a section inside the main content, not in the header – http://a.pomf.se/zgdffy.png
Regards,
JosueMay 23, 2015 at 7:50 am #448979Hi Josue,
The overlapping issue is being caused by the addition of the widget as outlined in the post “Adding a widget area to the header” that Elliott pointed me to on May 18. Following those directions, the login element widget was placed below the main menu and given a negative top-margin to be above the menu. It is in the location, below the menu, where the widget was placed, that the problem exists.
The content being blocked is 84 pixels high, below the main menu, the height of the log-in.
I have tried changing the z-index for #header from z-index: 501; to addresses the 84 pixels of white covering the content below the main menu, without success.
If you remove the code in the widget, the problem goes away. I have tried exchanging the text widget for an image widget with an image the size of the login box and I get the same overlapping issue.
Please advise how to have the log-in header element exist without impacting the content it is overlapping below the main menu.
Thanks!
May 23, 2015 at 7:56 am #448986Hey!
Can you post a mockup of how it should look?
Best regards,
JosueMay 23, 2015 at 5:40 pm #449078This reply has been marked as private.May 23, 2015 at 11:23 pm #449136Hm, try with this:
#header{ max-height: 180px !important; } #header_main_alternate, #header_main_alternate .container { max-height: 46px !important; }
Best regards,
JosueJune 14, 2015 at 6:51 am #458887Hello,
This all works very nicely, but I believe the modifications were being made to the functions.php file in the enfold theme and not in the child theme.
1. What needs to be done so that the modifications are in the child theme and not overwritten when updating Enfold, going forward?
2. And are there changes in any other files (excluding functions.php and the custom CSS) that I should keep track of?Yigit, you had logged in to make some of the modifications, so you may be the one to answer this question.
I very much appreciate the assistance with these details. Many thanks!
June 14, 2015 at 4:08 pm #458932Hi!
You can simply move this code to functions.php file of your child theme from parent theme functions.php file and add custom CSS code to Style.css file of your child theme. As you said, only functions.php file was edited and custom CSS code was added.
Cheers!
YigitJune 14, 2015 at 9:59 pm #459031This reply has been marked as private.June 15, 2015 at 2:16 am #459058Hey!
The website you posted is unaccessible:
Your access to this site has been limited
Also, can you please create us a WordPress administrator account in the installation in question?
Best regards,
JosueJune 15, 2015 at 5:06 am #459074This reply has been marked as private.June 15, 2015 at 8:42 pm #459650Hi!
I am getting “Your access to this site has been limited
Your access to this service has been temporarily limited. Please try again in a few minutes. (HTTP response code 503)
Reason: Access from your area has been temporarily limited for security reasons” as well.
I am located in Lithuania and Josue is in Peru.Best regards,
YigitJune 15, 2015 at 9:04 pm #459665This reply has been marked as private.June 15, 2015 at 9:20 pm #459681Hi Campbell!
I have added the code to functions.php file of your child theme and widget area is now showing up fine on my end. Please review your website now.
Regards,
YigitAugust 18, 2017 at 2:02 am #840702This reply has been marked as private.August 19, 2017 at 8:30 pm #841399Hi Campbell,
You seem to have a child theme and the header.php file in it. If this is the case, you need to merge the header.php file in your child theme with the fresh one from the parent theme.
Best regards,
VictoriaAugust 20, 2017 at 10:00 pm #841769Hi Victoria and Yigit,
Thanks for getting back to me. The header.php file is not the issue. Per your instructions, I have brought in an updated copy of the header.php file from Enfold 4.1.2 and added my Google fonts customization and the two issues we are trying to address are not resolved.
The two issues with how the site looks, moving from Enfold 4.0.7 to 4.1.2, when the site is viewed are:
- From 768 pixels wide to 989 pixels wide, the main menu in the blue bar (below the logo) disappears.
- From 768 pixels wide to 989 pixels wide, the customer login (to the right of the logo) disappears.
- (The site looks good from 767 pixels down and from 990 pixels up!)
On June 15, 2015, Yigit added code to the functions.php file of my child theme to enable the login. That is the reason this exchange is a continuation of that thread. functions.php is only 31 lines of code.
The only other file customization is in helper-main-menu.php, which changed 5 lines of code. I have issued a report of the file changes, compared to the current version used as a model at the time, Enfold Version 3.1.3 at https://www.dropbox.com/s/r6nzvpc9id7yhb5/. The changes are on pages 5 and 6 of the PDF.
Again, this works without issue at Example domain 1, using Enfold 4.0.7. The issue is upgrading to Enfold 4.1.2 and you can see the issue at Example domain 2.
Please advise.
Thanks – Campbell
-
AuthorPosts
- You must be logged in to reply to this topic.