Archived topic
Move search icon to header
18 replies · Started by russel on January 11, 2023
I tried this method: https://generatepress.com/forums/topic/move-the-search-icon-to-the-header/
But it doesn't work at my end: https://darkfaqs.com/
Could someone provide assistance?
Hi there,
Not sure if I fully understand.
What exactly are you trying to achieve?
Can you activate the navigation search first?
https://docs.generatepress.com/article/navigation-search/
Already activated it but didn't do anything.
here's the feature that I want
[img]https://i.imgur.com/mSE4UPt.jpg[/img]
Hi Russel,
Can you provide admin login credentials? We'll take a closer look at the issue.
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
see attached credentials
Thank you!
1. Go to Appearance > Widgets, and delete the Search Widget in the Right Sidebar. Example: https://share.getcloudapp.com/geuOygA2
2. As for the GP Search Icon not working, can you first create a menu in Appearance > Menus? Then, assign it to your Primary Menu or Off Canvas menu. Reference: https://docs.generatepress.com/article/using-the-wordpress-menu-builder/
If this doesn't do anything, try #1 here: https://docs.generatepress.com/article/debugging-tips/
I got all the steps working. But How do I make a functional search menu with an icon?
It's still not appearing. Have you tried disabling all non-GP plugins?
If not, can you try it?
I disabled all plugins except for code snippets and GP premium.
Still not working
You have this Snippet:
add_action( 'wp', function() {
if ( 'enable' === generate_get_option( 'nav_search' ) ) {
remove_action( 'generate_menu_bar_items', 'generate_do_navigation_search_button' );
add_action( 'generate_secondary_menu_bar_items', 'generate_do_navigation_search_button' );
remove_action( 'generate_inside_navigation', 'generate_navigation_search' );
add_action( 'generate_inside_secondary_navigation', 'generate_navigation_search' );
}
}, 20 );
Disable or remove this to make it appear.
It works now!
Did you set up some css code or something?
I just disabled things and it just suddenly show up on the headers.
No, I didn't change anything on your site.
Glad it's appearing now!
okay then.
How do I move it?
it is blocking the hamburger thing whenever I try to search
Where would you like to move it?
If it's possible, I want the header to be position like this
just the header, ignore the content
[img]https://i.imgur.com/5lbPntc.jpg[/img]