Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

AnythingSlider not showing up on Wordpress Child theme built on Hybrid

Posted on 2010-11-26
2
Medium Priority
?
518 Views
Last Modified: 2012-05-10
Hi,
 I'm trying to add an anythingSlider jQuery plugin above the content of my homepage.
 I'm trying to include it in a hook in the functions.php and it isn't showing up.
 I've created a template called gallery.php and placed this code in the functions.php:
This site is on my local machine so no link at the moment.
function my_init_method() {

//use google's jquery
if (!is_admin()){
	wp_deregister_script( 'jquery' );
	wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
	wp_enqueue_script('jquery');
	wp_enqueue_script('jquery.anythingslider', get_bloginfo('stylesheet_directory') . '/js/jquery.anythingslider.js');
	wp_enqueue_script('jquery.easing.1.2', get_bloginfo('stylesheet_directory') . '/js/jquery.easing.1.2.js');

	}

}    

add_action('template_redirect', 'my_init_method');

function my_in_head(){ 	?>

	<script type="text/javascript">
	//<![CDATA[

	jQuery.noConflict();
	jQuery(document).ready(function($) { //tells WP to recognize the $ variable

	//paste your jquery code here
	function formatText(index, panel) {
		  return index + "";
	    }

        $(function () {

            $('.anythingSlider').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 5000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 600,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		startText: "Go",             // Start text
		        stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });

            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(6);
            });

        });

	}); //end document ready functions

	/* ]]> */
	</script>

<?php }
add_action('wp_head', 'my_in_head');

add_action( 'hybrid_before_container', 'my_super_gallery' );

function my_super_gallery() {
		include (TEMPLATEPATH . '/gallery.php');
}

Open in new window

0
Comment
Question by:Alicia St Rose
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
Alicia St Rose earned 0 total points
ID: 34220945
figured it out.
I'm supposed to use STYLESHEETPATH instead of TEMPLATEPATH.

0
 
LVL 8

Author Closing Comment

by:Alicia St Rose
ID: 34220947
I figured it out on my own
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question