SDAC Blog

Check out our blog for WordPress updates, WordPress plugin reviews, and general web development hints.

hr
hr

If you would like to exclude one post from your blog, archive, search results or wherever you need to on your blog, you can do so by putting in a small piece of code within the particular WordPress loop:

The following example will show all posts except for the post with the ID of 179:

PHP:
<?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == '179' ) continue; ?>
<?php the_content();?>
<?php endwhile;endif;?>

This is something that I get a lot of requests for and is very useful in a number of situations.

hr

Comments/Pingbacks/Trackbacks

Add a Comment or trackback from your own site.

One Response

  1. DamionKutaeff

    Hello everybody, my name is Damion, and I’m glad to join your conmunity,
    and wish to assit as far as possible.

Leave a Reply

separate