• I am using code that allows for 3 rotating posts (and images). for a new site i would like to just list the top 3 stories, instead of having them rotate. i have been trying to “turn off” the rotation, but am making no headway. can someone tell me what in the php controls this, and how i can just list the stories?
    thanks in advance….
    <!– begin featured news –>
    <div class=”featured”>
    <h2>Featured News</h2>
    <div id=”featured”>
    <?php
    $tmp_query = $wp_query;
    query_posts(‘showposts=3&cat=’ . get_cat_ID(dp_settings(‘featured’)));
    if (have_posts()) :
    while (have_posts()) : the_post();
    ?>
    <!– begin post –>
    <div class=”fpost”>
    “><img src=”<?php echo get_post_meta($post->ID, “front_image”, true);?>” title=”<?php the_title(); ?>” alt=”<?php the_title(); ?>” />
    <h3>“><?php the_title(); ?></h3>
    <p class=”details”><?php the_time(‘F j, Y’) ?></p>

    <?php
    $max_length = 245;
    $length = $max_length-1;
    $blurb = dp_clean($post->post_content, 265); // 300 should be far enough from 265 to find a space

    // try and find where we have a space character
    while ( substr($blurb, $length, 1) != ‘ ‘ ) {
    $length++;
    };

    // now $length is how many characters we want from the post_content
    ?>
    <p><?php echo dp_clean($post->post_content, $length); ?>… “>Read more</p>

    </div>
    <!– end post –>
    <?php endwhile; endif; ?>
    </div>
    </div>
    <!– end featured news –>

  • The topic ‘How to stop rotating posts’ is closed to new replies.