I'm trying to display posts from a custom post type called portfolio using the code below and then filter the result by category, I have tried putting - category_name , catid, portfolio_category in the array
and have had a look around the forums and tried a few things but cant seem to get it to work , it either displays nothing or all the post from all categories.
<?php
$args=array(
'post_type' => 'portfolio',
'post_status' => 'publish',
'posts_per_page' => 7,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to
<?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
<?php
endwhile;
}
wp_reset_query(); // Restore global post data stomped by the_post().
?>
The registered taxonomy is portfolio_category, any help on this would be appreciated , many thanks