Advertisement
fayway

Untitled

Jan 15th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. if ($process==1){
  2.         $excluded_categories = array ('cat-slug-1', 'cat-slug-2');
  3.         $post_categories = wp_get_post_categories( $post_ID , array('fields' => 'all'));
  4.         foreach ($post_categories as $cat){
  5.             if(in_array($cat->slug, $excluded_categories)) {
  6.                 $process = 0;
  7.                 break;
  8.             }
  9.         }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement