Getting a sliding bar to show images from blog posts

Discussion in 'PHP' started by emforce, Dec 1, 2009.

  1. #1
    Ok guys so I have an image slider at the top of my website. This is part of a wordpress theme that I picked up and right now it isn't working. It is getting the permanent links from the right category but it won't show any pictures for it. I was wondering if there was any way to fix this?

    Here is the code

    <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>

    so what am I doing wrong?

    Thanks guys!
     
    emforce, Dec 1, 2009 IP
  2. emforce

    emforce Member

    Messages:
    308
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #2
    so guys any advice I really need some help with this!
     
    emforce, Dec 2, 2009 IP
  3. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #3
    This is stepcarousel plugin for jQuery, I'm using it on my site too, works very well.

    Can you give me a live link to your page? Or the theme which you're testing?
     
    myst_dg, Dec 2, 2009 IP