Forums

wp_enqueue_script not working (1 post)

  1. MAzCastro
    Member
    Posted 2 years ago #

    Hi

    I'm using the wp_enqueue_script method to add scripts to a theme.

    wp_enqueue_script( 'farbtasticJS', '(..)farbtastic.js');

    when I look at the postProcessed source I can see the scripts correctly included in the head section, but they are completely ignored by the browser.

    If I echo them, they are also correctly included in the head section, but now they are perfectly interpreted by the browser!

    echo("<script type='text/javascript' src='(..)farbtastic.js'></script>");

    weird!

    I want to code this the proper way, and I don't want to hard-code them by echoing the code.

    Can someone please help me to understand what might be wrong?

    Thanks

    MAC

Topic Closed

This topic has been closed to new replies.

About this Topic