Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

[SOLVED] page template jquery slideshow

Prev Previous Post   Next Post Next
Old Mar 23, 2013, 03:06 PM
24 posts · Dec 2011
[SOLVED] page template jquery slideshow

I'm trying to do add this to a template file and not use a plugin. Using all latest versions - Wordpress ATA 3.711 and WP 3.5.1. I'm pretty new to WP programming so may be going about this all wrong. I'm attempting to read in files from an image folder for a slideshow. Gets hung up after
HTML Code:
<div id="myslides">
HTML Code:
<a href="">Here's the page</a>
. I have added
PHP Code:
<?php wp_enqueue_script("jquery"); ?>
to header.php just before
PHP Code:
<?php wp_head(); ?>
. Maybe I'm not allowed to call the jquery function or scripts from within the template and if not where do I put them? Trying to modify theme files as little as possible. All tips are welcome as I am learning. Here's the latest version of my code (code is all tested and works outside of WP):
/* Template Name: Custom Interior Page */  
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
global $bfa_ata_postcount;
<script type="text/javascript">
var $j = jQuery.noConflict();

		fit: 1, pause: 1, timeout: 4000
<style> #myslides { height:400px; width:600px; } </style>
<div id="interior_wrapper">
    global $post;

	$img_directory = '../../images/'.$post_slug;
	// echo $directory;	  	
	// Styling for images	
	echo '<div id="myslides">';	
	foreach ( new DirectoryIterator($img_directory) as $item ) {			
		if ($item->isFile()) {
			$path = $img_directory . '/' . $item;	
			echo '<img src="' . $path . '"/>';	
	echo '</div>';
<script src="../../scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../../scripts/jquery.cycle.lite.js" type="text/javascript"></script> 
<?php get_footer(); ?>


jquery, slideshow, template

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to add a JQuery slideshow to the header or just below the header image GRF Header configuration & styling 3 Aug 22, 2011 11:16 AM
Creative ideas for d13 Slideshow or other Slideshow theadventurebite Plugins & Atahualpa 0 Jun 16, 2010 03:30 AM

All times are GMT -6. The time now is 04:38 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.