• Resolved betelguise

    (@betelguise)


    Hiya I want to replace the default search in Sofani Theme by Yolo with Fibo Search. Is this possible as it doesnt find an integration on installing

    Many Thanks

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @betelguise!

    Please try this code:

    add_action( 'wp_footer', function() { 
    	echo do_shortcode( '[fibosearch class="fibosearch-yolo-sofani" mobile_overlay="1" mobile_overlay_breakpoint="992"]' );
    	?>
    	<script type="text/javascript">
    		jQuery(document).ready(function($) {
    			$('.dialog-inner').append($('.fibosearch-yolo-sofani'));
    			$('body').on('click', '.icon-search-menu', function(e) {
    				e.preventDefault();
    				$('.js-dgwt-wcas-enable-mobile-form').trigger('click');
    			});
    		});
    	</script>
    	<style type="text/css">
    		#searchform {
    			display: none !important;
    		}
    
    		.fibosearch-yolo-sofani {
    			margin: 1em 0;
    			width: 70%;
    			position: absolute;
    			top: 40%;
    			left: 50%;
    			-webkit-transform: translate(-50%, -10%);
    			-ms-transform: translate(-50%, -10%);
    			transform: translate(-50%, -10%);
    		}
    
    		@media(max-width: 992px) {
    			#yolo_search_popup_wrapper {
    				display: none !important;
    			}
    		}
    	</style>
    	<?php 
    } );

    You have two ways to add this code to your theme:

    1. Open the functions.php in your child theme and add the code at the end.
    2. or install the Code Snippets plugin and apply this code as a snippet.

    Regards,
    Kris

Viewing 1 replies (of 1 total)
  • The topic ‘Yolo Sofani Theme’ is closed to new replies.