• Greetings!

    I’ve got a plugin that pulls a js file from the plugin directory, but I
    want it to be in the themes’ js directory instead. Can someone tell me how to change the following piece of code to do that?

    function add_faq_front_js() {
    $pluginPath = WP_PLUGIN_URL.’/’.str_replace(basename( __FILE__),””,plugin_basename(__FILE__));
    echo ‘<script type=”text/javascript” src=”‘.$pluginPath.’js/faq-frontend.js”></script>’;
    }

    Many thanks.

The topic ‘Change WP_PLUGIN_URL to Template directory’ is closed to new replies.