Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm including a jquery script in using the wp_enqueue_script

wp_enqueue_script('custom', get_template_directory_uri() . '/scripts/custom.js', array('jquery')); 

Since I'm not specifying the version, its automatically adding the current wordpress version number and i can see the source of the webpage as: custom.js?ver=3.4.1. There's a weird problem, the script is not being included. If I copy the js file url in address bar including the version number, it says page is not found. However, If I remove ending 1 in the version (ie. custom.js?ver=3.4), or add any other number like 3.4.2 then it will work.

I understand that I can specify the version number in the wp_enqueue_script, but I want to know why this is causing problem? I have couple of other js files also which have automatically added 3.4.1. but they work fine.

share|improve this question
ah, it looks like it was some cache problem. Anyway solved. – jay Jul 17 '12 at 7:44

closed as too localized by anu, toscho Jul 17 '12 at 10:50

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.