Hi @goblindreamsuk!
Please try this code snippet:
add_action( 'wp_footer', function() {
echo do_shortcode( '[fibosearch class="fibosearch-heromenu" darken_bg="0"]' );
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
if ($('.hmenu_search_lightbox_input').length > 0 && $('.fibosearch-heromenu').length > 0) {
$('.fibosearch-heromenu').appendTo('.hmenu_search_lightbox_input .hmenu_lightbox_form_holder');
$('.hmenu_search_lightbox_input #searchform').hide();
$('body').on('click', '.hmenu_search_holder .hmenu_search_btn', function(e){
e.preventDefault();
$('.fibosearch-heromenu .dgwt-wcas-search-input').focus();
});
}
});
</script>
<style type="text/css">
.dgwt_wac_focused #hmenu_load_1 .hmenu_lightbox_form_holder {
top: 15% !important;
}
</style>
<?php
}, 9999 );
You have two ways to add this code to your theme:
- Open the
functions.php
in your child theme and add the code at the end.
- or install the Code Snippets plugin and apply this code as a snippet.
Regards,
Kris