Excluding Category in Custom Post Type…
-
I believe I would have to ad or change something (probably in the array) in this bit of code?
`if($my_post_type == CUSTOM_POST_TYPE1){
$my_post_cat = ‘placecategory’;
}else{
$my_post_cat = ‘eventcategory’;
}$args=array($my_post_cat => $category,
‘post_type’ => $my_post_type,
‘posts_per_page’ => $number,
‘ignore_sticky_posts’=> 1);
$my_query = null;
$my_query = new WP_Query($args);if( $my_query->have_posts() ) { ?>
<div id=”loop” class=”list clear”>
<?php if($title){ ?> ……..`
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Excluding Category in Custom Post Type…’ is closed to new replies.