Hi,
I am not able to have posts work in coda slider on my main page. My main page is a static page and index page includes other posts apart from posts from my main page in a slider fashion.
Now the slider is working just fine with the index page data however with the static page it does not seem to work.
I am not sure if its a problem with the slider or the static page coding.
Below is the code for my static page.
<?php
/*
Template Name: more
*/
?>
<?php get_header(); ?>
<div id="mid" class="index">
<!-- Start slider -->
<div class="stripViewer">
<div class="panelContainer">
<?php wp_reset_query(); query_posts('posts_per_page=6'); if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="panel" id="post-<?php the_ID(); ?>" title="<?php the_title() ?>">
<div class="wrapper">
<?php
$media_type = get_post_meta($post->ID, 'lead_type', true);
$media = get_post_meta($post->ID, 'lead_image', true);
/* Display relevant code based on media type */
if(stristr($media, '.flv') || $media_type == 'flash') {
/* Grab video preview image if the user has added one */
$video_preview = get_post_meta($post->ID, 'video_preview', true); ?>
<span id="video-<?php the_ID(); ?>" class="flashvideo" style="height: 600px; width: 940px;">
<script type="text/javascript">
var s<?php the_ID(); ?> = new SWFObject("<?php bloginfo('template_directory'); ?>/flash/player.swf","n0","940","600","7");
s<?php the_ID(); ?>.addParam("allowfullscreen","true");
s<?php the_ID(); ?>.addParam("allowscriptaccess","always");
s<?php the_ID(); ?>.addParam("wmode","transparent");
s<?php the_ID(); ?>.addVariable("javascriptid","n0");
s<?php the_ID(); ?>.addVariable("height","600");
s<?php the_ID(); ?>.addVariable("width","940");
s<?php the_ID(); ?>.addVariable("searchbar","false");
s<?php the_ID(); ?>.addVariable("screencolor","0x000000");
s<?php the_ID(); ?>.addVariable("overstretch","true");
s<?php the_ID(); ?>.addVariable("showeq","false");
s<?php the_ID(); ?>.addVariable("showicons","true");
s<?php the_ID(); ?>.addVariable("shownavigation","true");
s<?php the_ID(); ?>.addVariable("showstop","false");
s<?php the_ID(); ?>.addVariable("showdigits","true");
s<?php the_ID(); ?>.addVariable("showdownload","false");
s<?php the_ID(); ?>.addVariable("usefullscreen","true");
s<?php the_ID(); ?>.addVariable("autoscroll","false");
s<?php the_ID(); ?>.addVariable("displayheight","600");
s<?php the_ID(); ?>.addVariable("thumbsinplaylist","true");
s<?php the_ID(); ?>.addVariable("autostart","false");
s<?php the_ID(); ?>.addVariable("bufferlength","3");
s<?php the_ID(); ?>.addVariable("repeat","false");
s<?php the_ID(); ?>.addVariable("rotatetime","5");
s<?php the_ID(); ?>.addVariable("shuffle","false");
s<?php the_ID(); ?>.addVariable("smoothing","true");
s<?php the_ID(); ?>.addVariable("volume","100");
s<?php the_ID(); ?>.addVariable("enablejs","true");
s<?php the_ID(); ?>.addVariable("linkfromdisplay","false");
s<?php the_ID(); ?>.addVariable("linktarget","_self");
s<?php the_ID(); ?>.addVariable("searchlink","http://search.longtail.tv/?q=");
s<?php the_ID(); ?>.addVariable("file","<?php echo $media; ?>");
s<?php the_ID(); ?>.addVariable("image","<?php echo $preview_image; ?>");
s<?php the_ID(); ?>.write("video-<?php the_ID(); ?>");
</script>
</span>
<? } elseif(stristr($media, 'iframe') || $media_type == 'iframe') {
/* Insert Iframe directly, stripping slashes from links etc */
echo stripslashes($media);
} else {
/* Else default behaviour is to display image */ ?>
<img src="<?php echo $media; ?>" alt="" width="940" height="600" />
<? }
?>
<div class="post-title">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</div>
<div class="entry">
<?php the_excerpt(); ?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
</div><!-- .panelContainer -->
</div><!--.stripViewer -->
</div><!-- .mid -->
<div class="stripNavL" id="stripNavL0"><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/left.png" alt="Left" /></a></div>
<div class="stripNavR" id="stripNavR0"><a href="#"><img src="<?php bloginfo('template_directory'); ?>/images/right.png" alt="Right" /></a></div>
<center><table style="width: 940px" class="bgcolor" align="center">
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td> </td>
<td>
<?php if(function_exists('adsensem_ad')){ adsensem_ad("bigs"); } ?>
<?php if(function_exists('adsensem_ad')){ adsensem_ad("shaadibs"); } ?>
<?php if(function_exists('adsensem_ad')){ adsensem_ad("branchrbox"); } ?></td>
<td> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table></center>
<?php query_posts('posts_per_page=6&offset=3'); $count = 1; if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="mid" class="single">
<div class="panel-single" id="post-<?php the_ID(); ?>" title="<?php the_title() ?>">
<div class="wrapper">
<?php $image = get_post_meta($post->ID, 'single_image', true); if ($image=="") { $image = get_post_meta($post->ID, 'lead_image', true); }
$media_type = get_post_meta($post->ID, 'lead_type', true);
if ($media_type != 'flash') { ?>
<img src="<?php echo $image; ?>" alt="" width="940" height="300" />
<? } ?>
<div class="post-title-single">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</div>
</div>
</div>
</div>
<?php if ($count == 3) : ?>
<center><a href="http://feeds.feedburner.com/Jagmag"><img alt="" src="http://jagmag.co.cc/wp-content/themes/viewport_1.1/viewport/images/subrss.png" border="0" /></a><?php if(function_exists('adsensem_ad')){ adsensem_ad("branchrwide"); } ?></center>
<?php endif; $count++; ?>
<?php endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
<?php wp_reset_query(); ?>
<center><?php if(function_exists('adsensem_ad')){ adsensem_ad("longmain"); } ?><a href="http://jalwa.co.cc/"><img alt="" src="http://jagmag.co.cc/wp-content/themes/viewport_1.1/viewport/images/jalwaad.gif" border="0" /></a></center>
<?php get_footer(); ?>
Please help.