Is it possible to add the search option from the main menu in the header into the full width submenu?
Hey kieranvyas,
Please try this solution: https://kriesi.at/support/topic/move-search-box-to-the-top-sub-menu/#post-191976
Best regards,
Mike
Hi Mike,
i would like to add a search icon to a full-width Submenu as well. Not in the main menu, and not in the top menu.
Is there a solution to achieve that?
Thanks a lot,
Sebastian
Hi Sebastian,
The solution provided by Mike is totally valid for your case, just put that php function call
<?php get_search_form();?>
wherever you need and style it properly.
Let us know if you have any more questions.
Best regards,
Victoria
But how do I add it to a fullwidth submenu element?
Hi kieranvyas,
Can you give us a link to your website, we need to see your menu?
Best regards,
Victoria
Website in private content. Thank you!
would you be so kind to post the solution after that?
I’m still searching the right place where to enter the get_search_form…
best regards,
sebastian
Hi,
@expectmore and @kieranvyas please provide a mockup on where you want to put search and what it has to look like.
Best regards,
Victoria
Please see private content
Hi Victoria,
please see the private content.
The vertical line is achieved a blind individual link, so the search icon should be the element before the last.
If that is not possible i would like to place it to the right, next to the WPML menu…
Hi kieranvyas,
Here is a solution for you. Put this code to your functions.php
add_action('wp_footer', 'ava_new_custom_script');
function ava_new_custom_script(){
?>
<script type="text/javascript">
(function($) {
function a() {
$('#menu-blog-menu').append($('li#menu-item-search').clone());
}
$(window).load(function() {
a();
});
})(jQuery);
</script>
<?php
}
Let us know if this was helpful.
Best regards,
Victoria
Hi expectmore,
I need a link to your website to be able to help you.
Best regards,
Victoria
That works! Thank you
Hi,
Glad we could help :)
Best regards,
Nikko