Tagged: yigit
-
AuthorPosts
-
April 4, 2016 at 2:27 pm #607610
Hi Guys
I’m trying to move the search form to the top bar (where the telephone number currently sits on the right.
I’ve tried this from other posts
add_filter( 'avia_meta_header', 'avia_append_search_nav_mod'); function avia_append_search_nav_mod() { ob_start(); get_search_form(); $form = htmlspecialchars(ob_get_clean()) ; $items = '<div id="menu-item-search" class="menu-item-search-mod menu-item menu-item-search-dropdown"> <a href="?s=" rel="nofollow" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'><span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span></a> </div>'; echo $items; }
it produces a white-out page ?
Has this solution been updated? is there an alternative?
Also I need to target the sub menu so that the blue background (of the sub menu) is .8 transparent. I have used advanced styling for the colour and hover state (but it won’t accept rgba) and css for the current page state.
Cheers
Steve
April 4, 2016 at 2:36 pm #607622Hi Steven!
Please try adding following code to functions.php file in Appearance > Editor
function custom_search_place(){ ?> <script> jQuery(window).load(function(){ jQuery('li#menu-item-search').children().appendTo("#header_meta ul.noLightbox"); }); </script> <?php } add_action('wp_footer', 'custom_search_place');
Regards,
YigitApril 4, 2016 at 3:01 pm #607648Hi Yigit
Thanks for a swift reply! It works great except for when I hover over it, it is like an underlined link rather than the search form. I then have to click the link to see the form (rather than just hover to see it as it usually does when it’s elsewhere).
Also how can I target this to give it some margin (and the blue sub-menu background mentioned above to get it transparent) with css ?
Cheers
Steve
April 6, 2016 at 6:29 am #608684Hey!
We use the previous code and it works fine. https://kriesi.at/support/topic/enfold-sub-menu-and-moving-search-to-top-bar/#post-607610
Please copy the code directly from this forum, not from your email. Check if there are any function with the same name.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.