Assuming you attached your wp_enqueue_script() call to the right action hook, the theme probably forgot to include wp_head() or wp_footer() in its header.php and/or footer.php. In that case the action to print header/footer scripts would never be called.

Thanks, I will try. The problem is, the customer is a beginner without programming knowledge and he also does not give me admin access Nice as always. And, of course – the issue appears on the live website.

sevenspark said
Assuming you attached your wp_enqueue_script() call to the right action hook, the theme probably forgot to include wp_head() or wp_footer() in its header.php and/or footer.php. In that case the action to print header/footer scripts would never be called.

this solved all the similar problems I add from clients.

If he can’t add this lines of code himself, and doesn’t give you admin access… then… not much more you can do

Your javascript requires jquery, so I put the $deps=array('jquery') on the dependency list, and no need to call jquery again on your shortcode. Then i put $in_footer=true to make sure that your javascript will be executed on footer. This is a better approach.

greenline said
Thanks, I will try. The problem is, the customer is a beginner without programming knowledge and he also does not give me admin access Nice as always. And, of course – the issue appears on the live website.

No need to be a developer to do this. I always try to give simple explanation for this type of buyer. The point is, they need to check it by himself. You can start making a standard answer for this.

For example:

- I believe that something wrong with your free theme. If you want to use free theme, I recommend you to download it from official WordPress repository, http://wordpress.org/themes/ because it follows all WordPress standard and already checked by WordPress reviewer.

- If you want to help me to check, you can go to Appearance – Editor, and click header.php on the left to edit this file and search wp_head. Then click footer.php on the left to edit this file and search wp_footer. If you can’t find it, it means that your theme is not standard and the theme developer has to fix it.

Thank you so much PrimaThemes! Such a detailed and helpful answer!
I will make these changes in the following version of my plugin too.

We just got it sorted out after about 5 hours of emails & debugging together – it turned out that functions.php and header.php from the free theme had some errors.

Pffff I have 10 years experience as Java&web developer … PHP still has some secrets for me I like your approach about free themes I never knew how to tell people that free themes have bugs without offending them.

Thank you guys for your help.
Another happy customer, time to go to sleep.