Tagged: header widget
-
AuthorPosts
-
March 24, 2024 at 8:06 pm #1438203
I need to place the company name between the logo image and right menu. I have tried to add a header widget area according to instructions, adding to my child theme code into php.functions and creating a text widget but isn´t working.
- This topic was modified 9 months ago by Rocuant.
March 25, 2024 at 9:24 am #1438244Hey Rocuant,
Thank you for the inquiry.
We added this code in the functions.php file to insert the widget area in the header.
<?php //-------------------------------- // Header widget area //-------------------------------- add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'header' ); }
We then created a custom widget area named “header” in the Appearance > Widgets panel and added a Text widget. To adjust the widget’s position within the header, we added the following code in the Quick CSS field:
#top #header #header_main .widget { position: absolute; right: 50%; transform: translateX(-50%); }
Please check the documentation below for more info: https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area
Best regards,
IsmaelMarch 26, 2024 at 4:55 am #1438317Thanks. I´ve tried to center the text (or banner) of the company name and size font using html or text in header widget but does not align. Then tried to use the following instructions https://kriesi.at/documentation/enfold/example-of-logo-left-widget-center-menu-right/#toggle-id-2 but still does not work.The text is stuck to the bottom, I need to align it at the height of the menu/logo and edit the font height and color. Also, change gray color now as background of the header
- This reply was modified 9 months ago by Rocuant.
March 26, 2024 at 7:14 am #1438320Hi,
Thank you for the update.
We adjusted the code in the Quick CSS field a bit.
#top #header #header_main .widget { position: absolute; right: 50%; transform: translateX(-50%); padding: 0; margin-top: -3px; padding-left: 10px; }
Best regards,
IsmaelMarch 29, 2024 at 4:59 am #1438577Thank you very much, works fine, but when I expand the page the text overflows. Will it be possible to make it adaptable? as text or as image (logo).
Another question about header, I have tried to change the background color (gray) but I can’t. I can change “logo area heading” when the menu shrinks, but in the “normal” position I don’t see where to change color.April 1, 2024 at 12:31 am #1438862Hi,
Your header is transparent the gray that you see is from the top color section on the page:
when the header is scrolled the #897270 color is from your Logo Area Color:
if you don’t want a transparent header change the setting on the page in the backend in the admin sidebar:
As for the header widget, I disabled the above css and added this:@media only screen and (min-width: 990px) and (max-width: 1670px) { #header_main .inner-container .widget .textwidget { margin-left: -196%; } } @media only screen and (min-width: 990px) and (max-width: 1440px) { #header_main .inner-container .widget .textwidget p span { font-size: 14px !important; } } @media only screen and (min-width: 1441px) and (max-width: 1670px) { #header_main .inner-container .widget .textwidget p span { font-size: 18px !important; } } #header_main .inner-container { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; } #header_main .inner-container .widget { padding: 0; } #header_main .inner-container .widget .textwidget { align-content: center; height: 100%; }
please clear your browser cache and check.
Best regards,
MikeApril 13, 2024 at 3:31 am #1439871This reply has been marked as private.April 13, 2024 at 3:08 pm #1439895Hi,
I think that your caching plugin was not letting the Quick CSS to show correctly, so I moved the css to WordPress ▸ Customize ▸ Additional CSS and it works good there. I adjusted the css to show a bigger font, please clear your browser cache and check.
This is the css that is now used:@media only screen and (min-width: 768px) and (max-width: 989px) { #header_main .inner-container .widget .textwidget p span { font-size: 24px !important; } } @media only screen and (min-width: 990px) and (max-width: 1439px) { #header_main .inner-container .widget .textwidget { margin-left: -196%; } } @media only screen and (min-width: 990px) and (max-width: 1439px) { #header_main .inner-container .widget .textwidget p span { font-size: 14px !important; } } @media only screen and (min-width: 1440px) and (max-width: 1670px){ #header_main .inner-container .widget .textwidget { margin-left: -97%; } } @media only screen and (min-width: 1440px) and (max-width: 1670px) { #header_main .inner-container .widget .textwidget p span { font-size: 24px !important; } } @media only screen and (min-width: 1671px) { #header_main .inner-container .widget .textwidget { margin-left: -66%; } } @media only screen and (min-width: 1671px) { #header_main .inner-container .widget .textwidget p span { font-size: 38px !important; } } #header_main .inner-container { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; } #header_main .inner-container .widget { padding: 0; } #header_main .inner-container .widget .textwidget { align-content: center; height: 100%; }
Best regards,
MikeApril 13, 2024 at 5:41 pm #1439913This reply has been marked as private.April 13, 2024 at 5:59 pm #1439915Hi,
It looked like you added many menu options in the Enfold Theme Options ▸ Advanced Styling and each was empty so the empty setting was overriding the Enfold Theme Options ▸ General Styling settings. I removed these for you and now your menu is back to the way it was.
If you want to use the Enfold Theme Options ▸ Advanced Styling to change the colors then you can, but to need to add the new colors for it to work.
I believe that we have solved your Header Widget that was the topic of this thread, please let us know if so we should now close this thread.
Please note that we ask that each thread stays on a specific topic, this helps other users and Mods. For further questions please open a new threadBest regards,
MikeApril 13, 2024 at 7:49 pm #1439923I appreciate your response Mike, it works perfectly now, thank you very much
April 13, 2024 at 8:46 pm #1439927Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Add a header widget area’ is closed to new replies.