• Resolved rsmith4321

    (@rsmith4321)


    I have a homepage of my website that I pull in the latest two post from my wordpress blog using the_excerpt. I want to be able to write less important post on my blog that don’t show on my website homepage. Is there a way to control what will show on the homepage? For example could I add something to my code that will prevent it from showing post if that include a certain category or something. I will post the current code I have below. Thanks for the help.

    define(‘WP_USE_THEMES’, false);

    require(‘./blog/wp-load.php’);

    query_posts(‘showposts=2’);

    ?><?php while (have_posts()): the_post(); ?><?php get_the_image( array( ‘the_post_thumbnail’ => true , ‘default_size’ => ‘medium’ , ‘height’ => ‘200’)); ?>

    <span style=”width: 40%; color: #DBAA56; font-weight: bolder;”><?php the_title(); ?>
    </span>
    <div style=”clear: both; padding-top: 1px”>
    <?php the_excerpt(); ?></div>

    <p>Read more…</p>
    <?php endwhile; ?>

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Showing the_excerpt based on category’ is closed to new replies.