• Advertisement
Sign in to follow this  

Wordpress Slide bar php problems

This topic is 3001 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys I am trying to do a bit of web development on my website and I am wondering how I could possibly get my image slidebar to work. my current code is:

<script type="text/javascript">
stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
panelbehavior: {speed:500, wraparound:true, persist:true},
defaultbuttons: {enable: true, moveby: 2, leftnav: ['<?php bloginfo('template_url'); ?>/images/scar2.jpg', -14, 68], rightnav: ['<?php bloginfo('template_url'); ?>/images/scar1.jpg', -2, 68]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['external'] //content setting ['inline'] or ['external', 'path_to_external_file']
})


</script>


<div id="myslides">
<div id="mygallery" class="stepcarousel">
<div class="belt">
<?php 
$slidecat = get_option('scar_gldcat'); 
$slidecount = get_option('scar_gldct');

$my_query = new WP_Query('category_name= '. $slidecat .'&showposts='.$slidecount.'');
while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
?>


<div class="panel">

<?php $screen = get_post_meta($post->ID, 'screen', $single = true); ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $screen; ?>&amp;h=100&amp;w=200&amp;zc=1" alt=""/> 
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>

<?php endwhile; ?>



</div>
</div>
</div>

This is in its own file which is called from the index.php But when I try it out it doesn't seem to work. How can I get it so that it grabs some images from posts in a certain category and then shows them as appropriate? My website is http://www.gamercity.co.uk - Clicky and I don't really want to format as to how it shows. Just how it gets the images. Thanks Guys!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement