Support » Plugins » code for adding Jquery plugin

  • Hi all,

    I’ve been trying to get a query plugin to work on my WordPress site. It’s not though and I’m hoping someone could tell me what I’m doing wrong…
    I went about as following:

    First I put the files


    in a js folder, which I put in my theme folder. I am using a child theme!

    I then put the following code in the functions.php of my child theme.

    function my_scripts_method() {
    if (!is_admin()) {
    wp_register_script( ‘curtain’, get_stylesheet_directory_uri() . ‘/js/curtain.js’, array( ‘jquery’ ) );
    wp_register_script( ‘scripts’, get_stylesheet_directory_uri() . ‘/js/scripts.js’, array( ‘jquery’ ) );

    add_action(‘wp_enqueue_scripts’, ‘my_scripts_method’);

    ..then this code in the scripts.js:



    I now just see the actual code on my front page and I get the following message (amongst others):

    Warning: Cannot modify header information – headers already sent by (output started at /data/home/stat01/domains/ in /data/home/stat01/domains/ on line 368

    What’s going wrong here??

    Thanks in advanceā€¦


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘code for adding Jquery plugin’ is closed to new replies.