Tagged: enfold, placement, search box
-
AuthorPosts
-
February 18, 2014 at 2:36 pm #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.16518February 18, 2014 at 5:08 pm #225568Hey 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,
IsmaelFebruary 18, 2014 at 5:18 pm #225589Thanks 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?
February 20, 2014 at 4:27 am #226562Hi!
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,
DevinFebruary 21, 2014 at 10:18 am #227337Good 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?
February 24, 2014 at 5:26 pm #228577I’m pretty weak on javascript but I’ll tag some of the other support crew who may be able to help.
February 25, 2014 at 5:17 am #228833Can you activate the PopUp again?
February 25, 2014 at 9:23 am #228917Hi!
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,
PeterFebruary 25, 2014 at 9:48 am #228920Thanks; 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?
February 25, 2014 at 2:00 pm #229010Hi!
Yes you can, please create a folder named “js” and copy&paste avia.js file inside it
Cheers!
YigitFebruary 25, 2014 at 5:24 pm #229079Thanks, 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.
February 26, 2014 at 4:16 am #229398Hey!
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,
IsmaelApril 8, 2014 at 10:38 pm #248974My search box was also appearing in the middle of the page on Google Chrome.
Peter’s fix to avia.js worked to solve it.
-
AuthorPosts
- The topic ‘Search box appearing in the wrong place’ is closed to new replies.