Thursday, July 25, 2013

custom post type with category query


$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;   
    $args = array(
    'post_type' => 'audio', 
  'paged' => $paged,
   'posts_per_page' => 15,   
  'tax_query' => array(
  array(
   'taxonomy' => 'audio_category',
   'terms' => array($cat),
   'field' => 'id',
  )
 ),
  
    'meta_query' => array(
        array(
            'key' => 'singername',
            'value' => $archivesinger,
     'compare' => 'LIKE'
                ),        
        array(
            'key' => 'albumn',
            'value' => $archivealbum,
            'compare' => 'LIKE'
        ), 
 
 ),
  
);


No comments:

Post a Comment