Skip to:

JQuery Issues

  • absticles


    Hey there.

    I’m a newbie to Buddypress and I’m developing a child theme for it.

    I’m having some issues with JQuery. I’m trying to create a simple slideshow using the help from this tutorial but I can’t seem to get the JS to work!

    In my header.php file I’ve tried every type of script I can think of. Currenty I have the jQuery file in MYTHEME_incjsjquery.js and in my header.php file I have the script location as php bloginfo(‘template_directory’) /_inc/js/jquery.js">
    I’ve tried ‘template_url’ and ‘stylesheet_directory’ and neither of those work either. I’ve also deactivated other plugins to see if there was a JavaScript conflict but no such luck. Not really sure where I’m going wrong!

    Hope someone can help!


Viewing 7 replies - 1 through 7 (of 7 total)

  • absticles


    Ps. I know that php code is wrong, I just don’t know how to display code in these forums!



    Can anyone help with this? Sorry, it’s probably a really simple solution!

    Boone Gorges


    Is your problem that the javascript isn’t loading?

    The best way to include the script is with

    You could also just edit the header.php file of your theme to include a script tag.

    add this to functions.php

    function my_init() {
    if (!is_admin()) {
    // load the local copy of jQuery in the footer
    // wp_register_script(‘jquery’, ‘/wp-includes/js/jquery/jquery.js’, false, ‘1.3.2’, true);
    // or load the Google API copy in the footer
    // wp_register_script(‘jquery’, ‘’, false, ‘1.4.2’, true);

    add_action(‘init’, ‘my_init’);

    comment out which one you want to use, then add ur jquery code to the footer.php above wp_footer();
    best way to load jquery is in the footer for faster page loading



    Thanks so much for your help! I really appreciate it.

    I’ve added that code to my functions.php file. Which bit of the code do you mean when you suggest to place my jQuery code into the footer? If you mean the whole div element which requires the jQuery that won’t work because it would move the div to a new part of the page?

    Thanks in advance. This has been driving me crazy all day!


    put your jquery code in the footer.php file, not the div…
    for example:
    script type=”text/javascript” src=”wherever the jquery plugin file is” /script
    script type=”text/javascript”
    your code

    ryt above wp_footer();
    i have left out < in the script part above coz these forums wont allow code argh! lol



    Thanks so much for your help! I’ll be honest, I couldn’t get what you suggested to work. I must have put something in the wrong place!

    But after fiddling with the script src’s in the header it suddenly started working. Weird!

    Thanks anyway pal!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘JQuery Issues’ is closed to new replies.
Skip to toolbar