- This topic has 15 replies, 3 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
March 7, 2023 at 11:29 pm #2559605
generatepressiscool
The search icon shows between signup and product.
1) How to do this in generatepress?
2) How to style the search bar the same way when you click on search?
March 7, 2023 at 11:51 pm #2559615Fernando Customer Support
Hello there,
Can you share the link to the site where you want this applied?
You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
We’ll recommend what CSS is needed to try and replicate it.
March 8, 2023 at 12:32 am #2559643generatepressiscool
Thanks!
March 8, 2023 at 12:58 am #2559663Fernando Customer Support
I see. You need to go to Appearance > Menus and delete the Contact button menu item.
Then, create a Block Element – Hook. Hook it to
menu_bar_items.Create the Contact button through a GB Button Block: https://docs.generateblocks.com/article/buttons-overview/
Then, add this through Appearance > Customize > Additional CSS:
span.menu-bar-item.search-item { order: -1; }March 8, 2023 at 1:26 am #2559685generatepressiscool
Thank you, that works.
Only problem now is that the button and signup don’t show inside the menu on mobile (they keep showing in the navigation bar).
How to fix that?
March 8, 2023 at 1:42 am #2559704Fernando Customer Support
I see. Can you re-add the Navigation Menu and give it a class of
menu-contact.Then add this CSS as well:
@media (min-width: 769px) { .menu-contact { display: none !important; } }Then, add
hide-on-*classes to the Button in the Block Element as instructed here: https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classesAdding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/
March 8, 2023 at 2:08 am #2559741generatepressiscool
Sorry – can you give me the full instructions starting from scratch?
It’s a bit confusing now 🙂
March 8, 2023 at 7:46 am #2560118David
StaffCustomer SupportHi there,
1. Go to Appearance > Elements.
2. the default Element Type will be Hook:https://docs.generatepress.com/article/block-element-hook/
Leave as that.
3. Set the Hook to:
menu_bar_items4. Set the Priority to:
305. Set the Element Display Rules -> Location to:
Entire Site6. in the element editor, add your Button
6.1 With the button selected in Advanced > Additional CSS Class(es) add:
hide-on-mobile7. Publish the element.
Once thats done we can talk about adding the button inside the mobile menu.
March 9, 2023 at 12:04 am #2560991generatepressiscool
Thank you, and that works great!
1. How to add this button to the mobile menu? I would like it to show at the bottom of the menu, like at https://ahrefs.com/blog/
2. How to style the search bar the same way when you click on search at https://ahrefs.com/blog/ ?
March 9, 2023 at 12:36 am #2561013Fernando Customer Support
1. Repeat steps 1-7(except 6.1) of David’s instruction with a new Block Element, but for step 3, set the hook to
inside_mobile_headerinstead.
2. Let’s proceed with this after 1 is finished/March 9, 2023 at 6:18 am #2561453generatepressiscool
Thanks. This doesn’t seem to work.
I did this
1. Go to Appearance > Elements.
2. Create new block.
3. Set the Hook to: inside_mobile_header
4. Set the Priority to: 30
5. Set the Element Display Rules -> Location to: Entire Site
6. in the element editor, add the Button
7. Publish the element.
The mobile menu (hamburger) doesn’t show the button.
March 9, 2023 at 6:49 am #2561489David
StaffCustomer SupportScrap that.
What type of menu do you have on mobile ? Is it the regular drop down ?March 9, 2023 at 8:08 pm #2562333generatepressiscool
We use the “SEARCH” theme at https://generatepress.com/site-library/
It’s the same mobile menu we use from that theme.
March 9, 2023 at 8:53 pm #2562362Fernando Customer Support
I see. If you just want to add it to the Off Canvas Panel of Search Template, you can add the Button through Appearance > Widgets > Off Canvas Panel.
March 9, 2023 at 11:02 pm #2562445generatepressiscool
Thanks that works. Let’s stop here for now. I’ll contact you if I need more help.
-
AuthorPosts
- You must be logged in to reply to this topic.