• 24th July 2010 - By Charly Leetham

    Scheduling posts is a a good thing to do if you have lots of information to  share or if you run a membership site and you want to drip content out to them.

    However, you want to give your members a sneak peek of what’s coming up – to increase the anticipation.  Here’s a simple function that you can modify to do this:

    function showupcomingposts() {$args=array(
    ‘post_type’=>’post’,
    ‘post_status’=>’future’,
    ‘posts_per_page’ => 10
    );
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query($args);
    if ($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post();
    echo ‘<div id=”contentmain”>’;
    echo ‘<h2>the_title();</h2>’;
    the_excerpt();
    echo ‘</div>’;
    endwhile; endif;
    }
    ?>

    I haven’t tested it – and it will require tweaking to present the output on your site, but it’s a good start.

    Enjoy.

    Charly Leetham is Wishlist Member Certified and an Online Business Implementation Expert and she helps small businesses take their business online. She provides services to solopreneurs and small business who wish to sell or promote their products and services online.
    Your Onine Business Implementation Expert and Virtual IT Support Team

  • Leave a Reply

    CommentLuv Enabled
     characters available