- This topic has 14 replies, 5 voices, and was last updated 4 years, 7 months ago by
Ying.
-
AuthorPosts
-
October 5, 2021 at 10:35 am #1953751
_blank
Hi,
I have a custom html widget in the header with Google search form. However, it doesn’t show on mobile header. I’d like it shows below mobile menu. I know this was already addressed before, but those solutions don’t seem to work for me. I have the latest theme version.Thanks for any tips.
October 5, 2021 at 10:44 am #1953757Leo
StaffCustomer SupportHi there,
Any chance you can link us to the site in question?
You can use the private information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-informationLet me know 🙂
October 6, 2021 at 2:20 am #1954350_blank
Hi, the website is offline, in development, so let me share some screens.
October 6, 2021 at 5:00 am #1954511David
StaffCustomer SupportHi there,
the Header Widget only exists in the standard site header. Options:
1. Disable the Mobile Header in Customizer > Layout > Header.
OR
2. Remove the header widget and use a Block Element, to add a Search Block to themenu_bar_itemshook. This will be display to the right of the nav on desktop and mobile.October 7, 2021 at 12:31 pm #1956382_blank
Thanks for these tips.
However, I’d like to keep the mobile header so I need another approach. I thought about Unsemantic Grid Classes displayed only on mobile, but I see the theme doesn’t use them anymore? (https://docs.generatepress.com/article/switching-from-floats-to-flexbox/)How can I create grids now?
October 7, 2021 at 1:25 pm #1956432Ying
StaffCustomer SupportHi Priotr,
You can use either of the methods that David replied.
If you want to keep the mobile header, then go with the second option:
2. Remove the header widget and use a Block Element, to add a Search Block to the menu_bar_items hook. This will be display to the right of the nav on desktop and mobile.
October 7, 2021 at 1:45 pm #1956454_blank
Ok, thanks.
And are there any grid classes I can use with the theme?October 7, 2021 at 9:35 pm #1956643Elvin
StaffCustomer SupportHi Piotr,
You may have to write the CSS manually.
Here’s a great documentation about it. 😀
https://css-tricks.com/snippets/css/complete-guide-grid/October 8, 2021 at 7:25 am #1957049_blank
Ok, thanks again. I thought the theme has some ready grid classes.
October 9, 2021 at 3:44 pm #1958540_blank
I have played around with adjusting the header with search form in different screen sizes following your suggestions and have come up with something I’d would see as close to final, but may I please ask you to verify it, as I’m not sure if I have addressed the right css classes (details in private note).
Thanks!
October 9, 2021 at 4:22 pm #1958545Ying
StaffCustomer SupportIt looks right visually, but can you link us to your site so we can see the CSS as well as the HTML?
October 10, 2021 at 2:32 am #1958744_blank
The website is only available offline. I could provide some more code on your request.
October 10, 2021 at 10:34 am #1959165David
StaffCustomer SupportCan you provide a screenshot of how you want the header to look on desktop and mobile ?
May be easier for us to then provide a more specific solution.October 11, 2021 at 2:27 am #1959567_blank
I used the following code to make the layout of the mobile header:
@media (max-width: 600px) {
.has-inline-mobile-toggle .inside-header, .has-inline-mobile-toggle .mobile-menu-control-wrapper {
flex-direction: column;
margin-left: 0;
}
.menu-bar-items {
padding-top: 20px;
padding-bottom: 20px;
}
}It looks as expected (although I haven’t tested this on too many browsers yet), but maybe I should address different css classes?
Thanks.
If there is a better way to do it (addressing some other classes), I’d appreciate youOctober 11, 2021 at 11:13 am #1960233Ying
StaffCustomer SupportSorry we can’t calculate the result by just reading the CSS without seeing the live site.
As long as the result is what you are expected, I think that’s valid CSS.
-
AuthorPosts
- You must be logged in to reply to this topic.