Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #225491

    My Enfold search box is appearing in the wrong place. When the magnifying glass icon is clicked the search box (line with the arrow) appears floating in the bottom-middle of the page rather than underneath the icon as it should be.

    I have done a quick forum search and found this mentioned here; https://kriesi.at/support/topic/enfold-search-box-position/, but the fix was never really found – it just went away…

    I have checked my custom css files (and removed it entirely), and that doesn’t seem to be the problem. I have also tried deactivated plugins, again without much luck.

    Any help to diagnose this would be greatly appreciated.

    Website: http://www.animana.com/
    Enfold version: 2.5.2 (with child theme)
    Browsers tried: Chrome: 32.0.1700.107 m, Internet Explorer: 11.0.9600.16518

    #225568

    Hey dngood!4

    The search tool tip is working properly on our end so it must be a plugin on your end that is causing the issue. Please deactivate all plugins then remove browser cache or test it on another browser.

    Regards,
    Ismael

    #225589

    Thanks Ismael, as I had stated, I did try deactivating plugins. I have just tried it again – disabling all plugins, clearing caches and trying both IE and Chrome. Still the same problem with incomplete search box displayed at the bottom middle of the page.

    Can you take a look at the site and let me know if you have any other ideas?

    #226562

    Hi!

    The only thing I can think of is that the code in the header.php has been changed or a function/filter is modifying the search and breaking the html structure from how it should be by default.

    Best regards,
    Devin

    #227337

    Good call Devin, I had installed the WordPress PopUp plugin and some custom code in the functions.php file so that the pop-up closed on a click. Evn though I disabled the plugin for testing, of course the function remained:

    function custom_popup_script(){?>
    		<script type='text/javascript'>
    		jQuery( "body" ).on( "click", function(e) {
    			var target = jQuery(e.target);
    			if( ! target.is('#message') )
    				jQuery( "#closebox" ).trigger( "click" );
    		});
    		</script>
    <?php }
    add_action('wp_footer', 'custom_popup_script');

    Can you see any easy way to re-introduce this code without upsetting the search box?

    #228577

    I’m pretty weak on javascript but I’ll tag some of the other support crew who may be able to help.

    #228833

    Can you activate the PopUp again?

    #228917

    Hi!

    You can try to replace this line in enfold/js/avia.js:

    
    new $.AviaTooltip({"class": 'avia-search-tooltip',data: 'avia-search-tooltip', event:'click', position:'bottom', scope: "body", attach:'element'});
    

    with

    
    new $.AviaTooltip({"class": 'avia-search-tooltip',data: 'avia-search-tooltip', event:'click', position:'bottom', scope: "#header", attach:'element'});
    

    This change will change the click event scope and maybe fix your issue.

    Best regards,
    Peter

    #228920

    Thanks; the above avia.js fix works perfectly.

    What’s the correct way (if any) to preserve this against getting overwritten in version upgrades – can I add this to my child theme?

    #229010

    Hi!

    Yes you can, please create a folder named “js” and copy&paste avia.js file inside it

    Cheers!
    Yigit

    #229079

    Thanks, I’ve tried that, but despite trying different browsers and refreshing, the page is still loading the standard /wp-content/themes/enfold/js/avia.js?ver=1 file.

    #229398

    Hey!

    Add this on the child theme’s functions.php:

    /*
     * Register frontend javascripts:
     */
    if(!is_admin())
    {
    	add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 100);
    }
    
    function avia_register_child_frontend_scripts()
    {
    	$child_theme_url = get_stylesheet_directory_uri();
    
    	//register js
    	wp_register_script( 'avia-default-child', $child_theme_url.'/js/avia.js', array('jquery'), 1, false );
    	wp_enqueue_script( 'avia-default-child' );
    }

    Regards,
    Ismael

    #248974

    My search box was also appearing in the middle of the page on Google Chrome.

    Peter’s fix to avia.js worked to solve it.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Search box appearing in the wrong place’ is closed to new replies.