exclude some posts with particular words
-
Hi I want to not feature or delete posts with the word ‘NO DESCRIPTION’
is it possible to insert:
<!--Begin recent post (single)--> <?php if (get_option('whoswho_duplicate') == 'on') $ids = ''; ?> <?php $args=array( 'showposts'=>get_option('whoswho_homepage_posts'), 'post__not_in' => $ids, 'paged'=>$paged, 'category__not_in' => get_option('whoswho_exlcats_recent'), ); <strong>$word="NO DESCRIPTION"; </strong>?> <?php query_posts($args); if (have_posts()) : while (have_posts()) : the_post() and $word=0; ?> <h2 class="titles"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permanent Link to %s','WhosWho'), get_the_title()) ?>"> <?php truncate_title(200) ?></a></h2>
Do you think this code is right and should work?
- The topic ‘exclude some posts with particular words’ is closed to new replies.