0

The title explains the issue. I did my best to find reason behind such dysfunctionning.

Can you please tell me what can be the causes of such issue? Any techniques to investigate the problem are welcome.

Thank you for your help.

Edit: After using the debugging suggestion, I have the following errors in my debug.log file. What I dont understand is why I have errors in functions.php at line 2959 while the last line in my functions.php is 2145.

[22-Oct-2013 17:21:33 UTC] PHP Notice:  wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>init</code> hooks. Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.) in C:\xampp\htdocs\balagha-to-alquran\production\wp-includes\functions.php on line 2959

[22-Oct-2013 17:21:33 UTC] PHP Notice:  wp_enqueue_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>init</code> hooks. Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.) in C:\xampp\htdocs\balagha-to-alquran\production\wp-includes\functions.php on line 2959

Edit: I see that a plugin is the responsible of above notices. When I deactivate it I see that the errors disappear. the part of the code in the plugin file that seems responsible is:

  if (!is_admin() ){
    if (get_option('jqfoot_nohover')!=TRUE){        //if its not checked load the JS/CSS
    //wp_enqueue_script('jquery');  //no need here, loads as dependancy in next line down
    wp_enqueue_script('footenote_js', plugins_url('/footnote-voodoo.js', __FILE__), array('jquery'));
    // it would save load to put these css rules into your template css and comment this next line out
    wp_enqueue_style('footenote_css', plugins_url('/footnote-voodoo.css', __FILE__) );          
    }

How can I make wp_enqueue_script and wp_enqueue_style work correctly. Thank you again for your time. } //end !is_admin()

  • 4
    do you have debugging enabled? – Milo Oct 22 '13 at 16:01
  • 2
    Have you done basic debugging? What error messages are being generated? – Chip Bennett Oct 22 '13 at 16:01
  • No I am not using Debugging. I am reading about it in the link provided by Milo. I will come back here to give additional details. Thank you very much. – whiteletters in blankpapers Oct 22 '13 at 16:03
  • 2
    The error notice tells you the problem, what have you done to fix it? – Wyck Oct 22 '13 at 16:28
  • 2
    The notices refere to wp-includes\functions.php, not to your theme's functions.php. The problem is with how you are using the Core functions referenced in the errors. Look the functions up in the Codex and see if you can work out the issue. – s_ha_dum Oct 22 '13 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.