-
AuthorPosts
-
January 18, 2017 at 12:59 am #735048
Hi
I’m using UberMega Menu plugin on my website, but would like to use and move the Enfold search icon to my secondary menu at the top right hand of my site. I found the following ticket reference #163772 (2013) that contains a code snipet to do this. However, I don’t want updates to the theme files to overwrite this. Where and how can I add it to my functions.php of my Child theme?
Any help would be appreciated.
My website is currently in development and you will need login credentials to view it. I have included these int he private area.
Thanks
LyseJanuary 20, 2017 at 1:21 pm #736420Hey tremblayly,
To add the search bar to topbar menu please add the following code to functions.php file from Appearance > Editor
add_shortcode('avia_search', 'get_search_form');
Add the following shortcode as menu item or in Header > Extra Elements > Header Phone Number/Extra Info
[avia_search]
Best regards,
Vinay- This reply was modified 7 years, 11 months ago by Vinay.
January 20, 2017 at 4:07 pm #736550Hi Vinay,
I followed the instructions to add the avia_search to my topbar menu, but all I see is the “shortcode” text. It though that the following UBER Mega Menu function to remove the avia search is what’s causing it, but I removed it and still all I see is the shortcode text.
/*UBER MEGA MENU: Remove the Enfold Search in functions.php
Since the Enfold search won’t be compatible, we’ll remove it. You can add in an UberMenu search bar instead. */
function remove_avia_search(){
remove_filter( ‘wp_nav_menu_items’, ‘avia_append_search_nav’, 10, 2 );
}
add_action( ‘init’ , ‘remove_avia_search’ );Thanks
LyseJanuary 21, 2017 at 3:42 pm #736782Hi,
We need to take a closer look Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
Login credentials include:
- The URL to the login screen.
- A valid username (with full administration capabilities).
- As well as a password for that username.
- permission to deactivate plugins if necessary.
Best regards,
VinayJanuary 21, 2017 at 3:54 pm #736789Hi Vinay,
You have permission to deactivate plugins if necessary.
Please find login credentials in private area.
Thank you
LyseJanuary 21, 2017 at 5:01 pm #736805Hi!
Please add the following to your functions.php
add_filter('wp_nav_menu_items', 'do_shortcode');
and let us know if that fixes the issue.
Thanks a lot
Best regards,
BasilisJanuary 21, 2017 at 5:50 pm #736819Hi Basilis,
That added the search icon and box, but it does not display nicely. The CSS would need to be tweaked. If you can help me with doing this that would be great.
Thanks
LyseJanuary 21, 2017 at 6:11 pm #736823Hey!
That is an extra work and depends on what you need to do.
A better case scenario to that, is to hire a freelancer who would help you with any customisations you need, to make it look as you prefer.
Let us know if we can do anything else to help you out, regarding our theme.Thanks a lot
Best regards,
BasilisJanuary 21, 2017 at 7:11 pm #736840Hi Basilis,
If I knew the class I could do it myself….I need to resize the icon and adjust the padding
Thanks
LyseJanuary 23, 2017 at 7:17 am #737133Hi,
Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:
#menu-item-20684 { margin-top: -11px; } .header_color input[type='submit']{ border:none!important; }
To find the class name of an element please right click on the element and inspect. This will open chrome developer window and give you access to the html source code and class names of the element :)
Best regards,
VinayJanuary 23, 2017 at 5:34 pm #737361Hi Vinay,
Worked perfectly with margin-top of -13px.
Thank you so much for this.
Lyse -
AuthorPosts
- The topic ‘Move Search Icon to Secondary Menu’ is closed to new replies.