Limit Gallery to One Post Type
-
Hi – Thanks in advance for any support.
The following snippet of code is pulled from the Page’s .php file. The page displays a lightbox gallery 3 wide of posts from a type called “Portfolio.” Within this type, there are various categories, one of them being “sold.” I’m interested in making this particular gallery display only items classified as sold, but confess I can’t figure where/how to edit the following code to reflect that. Thank you again.
backticks
<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=9′); ?>
<?php if ( ! have_posts() ) : ?>
backticks
The topic ‘Limit Gallery to One Post Type’ is closed to new replies.