Eliminating One Category Type (PHP)
-
Hi,
I’ve been able to manipulate the below code to show only one category – ‘sold’ – under the post type ‘portfolio.’ Now I’d like to manipulate it to exclude only the category type ‘sold’
Any help would be appreciated. All my tricks/attempts failed thus far.
<?php /** * Template Name: Portfolio 2 columns */ get_header(); ?> <div id="content" class="grid_12"> <?php include_once (TEMPLATEPATH . '/title.php');?> <?php global $more; $more = 0;?> <?php $values = get_post_custom_values("category-include"); $cat=$values[0]; ?> <?php $catinclude = 'portfolio_category='. $cat ;?> <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); ?> <?php $wp_query->query("post_type=portfolio&". $catinclude ."&paged=".$paged.'&showposts=8'); ?> <?php if ( ! have_posts() ) : ?> <div id="post-0" class="post error404 not-found"> <h3 class="entry-title"><?php _e( 'Not Found', 'theme1487' ); ?></h3> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'theme1487' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </div><!-- #post-0 --> <?php endif; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Eliminating One Category Type (PHP)’ is closed to new replies.