• I have a featured content slider but as title says it doesn’t display the right image that mathces the current post it displays.

    Here is my site: test.1blogger1.com

    Here is the code:

    `<div class=”featured-img”>
    <div id=”featured”>
    <div class=”featured”>
    <?php
    $tmp_query = $wp_query;
    query_posts(‘cat=’ . get_cat_ID(dp_settings(‘featured’)));
    if (have_posts()) :
    $first = true;
    while (have_posts()) : the_post();
    ob_start();
    ?>
    <li<?php if ($first) echo ‘ class=”first”‘; ?>>“><?php dp_attachment_image($post->ID, ‘full’, ‘alt=”‘ . $post->post_title . ‘”‘); ?>
    <?php
    $photos .= ob_get_clean();
    ob_start();
    ?>
    <li<?php if ($first) echo ‘ class=”first”‘; ?>>
    <h2>“><?php the_title(); ?></h2>
    <p><?php echo dp_clean($post->post_content, 300); ?></p>
    ” class=”next”>Read Full Story

    <?php
    $text .= ob_get_clean();
    $first = false;
    endwhile;
    endif;
    ?>
    <ul class=”photo”>
    <?php echo $photos; ?>

    <ul class=”text”>
    <?php echo $text; ?>

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

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Featured Content Slide not Displaying the Correct Image for Each Post?’ is closed to new replies.