Question

I am a newbie to Bluehost and to Wordpress (I am actually a Coldfusion person !!). I am building a site for a colleague and I want to use some jQuery functionality. From the Bluehost cPanel I have installed and enables a jQuery plugin, but I cannot see the jQuery scripts being loaded with firebug when I call my pages in a browser. jQuery function calls using $() and jQuery() both produce unknown function js errors as well.

When I log in through the ftp server to my account I cannot see a header.php file in which to 'wp-enque' the script as has been suggested on various other forums..

There is a file called "wp-blog-header.php" in the /public_html directory. Now not being a wordpress, expert can someone who has experience doing this on Bluehost kindly help me out.

UPDATE: I have found my way through the site structure and found the header.php file in the themes folder and added the following to it as suggested in other blogs on the web.

<?php
function wp_jquery_method() {
    wp_enqueue_script('jquery');            
}    

add_action('wp_enqueue_scripts', 'wp_jquery_method'); 
?> 

No luck as I still cannot call jQuery functions using jQuery() function call

regards

Angus

Was it helpful?

Solution

I have resolved the issue as I had made the mistake of placing the above code which is correct BELOW the <?php wp_head(); ?> Statement in the header.php file associated with the therme..

This is simple operator error and probably done to late at night ! Sorry for wasting peoples' time..

the correct solution was found at http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/

Gus

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top