exclude one post from a custom post type archive
-
I’ve tried modifying the loop on the custom post type archive but it isn’t excluding it. Here is one bit of code I tried:
<?php while ( have_posts(array('post__not_in' => array(5377))) ) : the_post(); ?>
It doesn’t work to modify the if part of the loop, either.
I’m trying to have one post be a description for the custom post type, so I want to pull it into the archive page but not listed among the posts.
FYI – I want to use a description here instead of the one in the custom post type creator so I can use html tags in the text.
- The topic ‘exclude one post from a custom post type archive’ is closed to new replies.