Integrating JQuery with WordPress, Galleriffic slideshow troubleshoot
-
Hello. I’m working with the Galleriffic 2.0 Jquery photo gallery to make a lot of slideshows. I’ve gotten it working on a regular html site just great, but I cannot seem to get it working on a WordPress site. Google searches have proved fruitless for documentation on integrating Jquery with WordPress, specifically for this plugin. It seems to be a popular Jquery script, so I’m sure someone has tried to integrate it with WordPress before.
I’m currently setting up the files like thus:
in the header.php:
I put this script code between the meta tags and the css tag:
(I’ve taken the greater and less than signs out so it displays the code here in the thread)
?php wp_enqueue_script(‘jquery’); ?
<script type=”text/javascript” src=”/scripts/jquery.galleriffic.js”>
<script type=”text/javascript” src=”/scripts/jquery.history.js”>
<script type=”text/javascript” src=”/scripts/jquery.opacityrollover.js”>Then in my regular index page, I have the content divs containing the photo gallery.
Finally, in the footer.php, I have added right before the tag:
script type=”text/javascript”
jQuery(document).ready(function($) {
// We only want these styles applied when javascript is enabled
$(’div.navigation’).css({’width’ : ‘300px’, ‘float’ : ‘left’});
$(’div.content’).css(’display’, ‘block’);
…… –and on til the closing script tag.This does not work. I’m unsure of the correct procedure for WordPress to display this correctly. I added the css of galleriffic to my own style sheet, because I didn’t understand how to get WordPress to load an additional css file. Viewing the page source does show the javascripts were loaded. I also tried adding the actual photo gallery content divs into a Page from the WordPress admin, but that proved fruitless too. I also do not know in what exact folder WordPress expects my thumbnail and regular size images for this gallery to be. I could upload them all one by one from the WordPress admin, but since I am working locally via Mamp, it would seem easier to just put the images in the right folder. But what folder would that be?
Any help on integrating Jquery with WordPress would be greatly appreciated. I’ve hit a brick wall with this and imagine someone has encountered this problem before. Thanks!
- The topic ‘Integrating JQuery with WordPress, Galleriffic slideshow troubleshoot’ is closed to new replies.