How to get only one category of custom post type?

I get all post successfully of CPT which are Order by meta_key value Date. Code is below

$today = date(“Y/m/j”);
query_posts(array(
‘post_type’ => ‘event’,
‘posts_per_page’ => 10,
‘meta_key’ => ‘_start_eventtimestamp’,
‘orderby’ => ‘meta_value’,
‘order’ => ‘ASC’,
‘meta_query’ => array(
array(
‘key’ => ‘_start_eventtimestamp’,
‘meta-value’ => $value,
‘value’ => $today,
‘compare’ => ‘>=’,
‘type’ => ‘CHAR’
)
)
));
if (have_posts()) :
while (have_posts()) : the_post();

Now trying to display one category at a time using order by meta box value.

post_type=>event, taxonomy=>event_catgory, slug=>green

How can i show these post on index.php and also order by meta_key value which is Date?

Read more here:: How to get only one category of custom post type?

Leave a Reply

Your email address will not be published. Required fields are marked *