- This topic has 9 replies, 3 voices, and was last updated 4 years, 8 months ago by Leo.
-
AuthorPosts
-
April 17, 2018 at 1:51 pm #553138brians
Hi Tom,
How difficult would it be to change the header to a widgetized capability?
I have made some sites where they want two header widget areas side by side plus the logo. I’ve made others where they want their logo and the business name underneath.
So I didn’t know if it would be an extra feature capability that could be setup like the following for the header:
Logo + 1 Widget
Logo + 2 Widgets
3 WidgetsThat way it gives a total of three widget areas – and two of those options would keep the logo option under “Site Identity”.
Hopefully that makes sense π
April 17, 2018 at 6:48 pm #553286LeoStaffCustomer SupportHi there,
Hmm the header already has a header widget area: https://docs.generatepress.com/article/header-widget/
You can insert as many widgets as you want.
For three widgets in header, perhaps this method is useful to you?
https://docs.generatepress.com/article/split-header-three-sections/Let me know if this helps π
April 17, 2018 at 7:28 pm #553308briansThe information you sent works, but it definitely requires extra steps compared to an actual built-in feature that would do this automatically.
As an example, under Layout -> Footer, you can choose how many widgets you want in the footer. If something similar could be done for the header, and then actual widgets used instead of GP Hooks, that would be pretty nice.
April 18, 2018 at 8:30 am #553863LeoStaffCustomer SupportHmm usually people use global setting for header so all the widget shows.
We will keep the suggestion in mind though π
Let me know if you need more help on this.
April 18, 2018 at 8:32 am #553866briansCorrect – but with the current theme, there is a spot to put the logo (under the Site Identity) and then only a spot for one header widget. If there is the ability to add an option under the Layout -> Header section to choose how many widgets for the header – something like:
Logo + 1 Widget
Logo + 2 Widgets
3 WidgetsThat would allow for a great deal of flexibility π
April 18, 2018 at 8:59 am #553897LeoStaffCustomer SupportYou can already add multiple widgets in the header widget area.
They should all show up just stack on top of each other.
April 18, 2018 at 9:04 am #553906briansYep, as you said – they will stack on top of one another. But like was mentioned in the prior article, there was one to create two header widgets side-by-side plus the logo by using GP Hooks and the coding.
April 18, 2018 at 9:21 am #553926LeoStaffCustomer SupportWe can also a little bit of CSS to un-stack them.
The hook method is only necessary if you want to divide them into even space.
Now I think about it we can also use flexbox for that I believe π
August 16, 2019 at 1:45 pm #986078TerryFlexbox works great, just add this css:
.header-widget { display: flex; justify-content: flex-end; flex-flow: row wrap; } And you can handle each child with:
.header-widget aside:nth-child(1) {
flex-basis: 50%;
margin-right: 10px;
}
I’ve got 3 header widgets side by side on my site, http://ras2.teebark.com
Flexbox also makes the widgets responsive, so on a phone they’re vertical.August 16, 2019 at 1:48 pm #986084LeoStaffCustomer SupportThanks for sharing!
-
AuthorPosts
- You must be logged in to reply to this topic.