January 8, 2013 at 2:54 pm #19198
It appears that for some reason enqueued scripts are being inserted in the middle of the body instead of head, which causes issues.
What may be causing this and can this be fixed?
ThanksJanuary 8, 2013 at 7:54 pm #102630
Can we take a look at your site live? They should only be getting spit out at wp_head in the header.php file. Can you also try disabling all active plugins except for woocommerce and see if that fixes the issue?
DevinJanuary 9, 2013 at 3:46 pm #102631
Hi Devin, thank you very much for quick reply.
An example can be observed here: http://www.hiyorkdale.com/
Disabling plugins didn’t help.
ThanksJanuary 10, 2013 at 11:46 am #102632
If you want to change the location of the theme scripts open up functions.php and replace:
wp_register_script( 'avia-prettyPhoto', AVIA_BASE_URL.'js/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery', "3.0.1", true);
wp_register_script( 'aviapoly-slider', AVIA_BASE_URL.'js/aviapoly2.js', 'jquery', "1.0.0", true);
wp_register_script( 'avia-prettyPhoto', AVIA_BASE_URL.'js/prettyPhoto/js/jquery.prettyPhoto.js', 'jquery', "3.0.1", false);
wp_register_script( 'aviapoly-slider', AVIA_BASE_URL.'js/aviapoly2.js', 'jquery', "1.0.0", false);January 11, 2013 at 4:57 pm #102633
Thanks for the quick reply,
The issue that I’m having is that I can not have jquery datepicker to work with your theme. I thought it had something to do with the way some script are included in footer, but it sees the problem is elsewhere.
Here’s what I’m enqueuing:
From what I understand, there is a conflict with prettyphoto used in the theme.
I do not get any js errors, but the popup does not appear in your theme. It appears if i switch to a different theme though.
Could you look into this please?January 12, 2013 at 5:04 pm #102634
The datepicker doesn’t support custom z-index values. If the theme (like Replete) changes the z-index for the content area the datepicker div will break. You need to add following code to css/custom.css or the quick css field to fix the issue:
z-index: 99 !important;
}January 15, 2013 at 7:07 pm #102635January 16, 2013 at 3:36 pm #102636
The topic ‘Enqueued scripts inserted in the middle of the body’ is closed to new replies.