So i am having an issue where i try to get the latest posts but also the related one from Custom Post Format - Video.

Didnt see anywhere this solution/tut, is it even possible, i guess it is. I just cant find the right combo. This is the code i have and it works, but of course it shows only all latest posts (Post Format Video), so how to fix it to show latest related by cat or tag?

    $custom_taxterms = wp_get_object_terms( $post->ID,
                'category', array('fields' => 'slugs') );
  // arguments
  $args = array(

  'posts_per_page' => 8, // you may edit this number
  'orderby' => 'date',
  'order' => 'DESC', 
  'tax_query' => array(
        'taxonomy' => 'post_format',
        'field' => 'slug',
        'terms' => array( 'post-format-video' )


  <?php  $query = new WP_query ($args);?>
  <?php if ($query->have_posts()) : 

  echo '

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.