Guest User

Untitled

a guest
Jul 16th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. $posts = get_posts(array(
  2. 'posts_per_page' => 10,
  3. 'post_type' => 'company_product',
  4. 'tax_query' => array(
  5. array(
  6. 'taxonomy' => 'taxonomy',
  7. 'field' => 'slug',
  8. 'terms' => 'product1'
  9. ),
  10. ));
  11.  
  12. $posts = get_posts(array(
  13. 'posts_per_page' => 10,
  14. 'post_type' => 'company_product',
  15. 'tax_query' => array(
  16. if( have_rows('category_taxonomies') ):
  17. while ( have_rows('category_taxonomies') ) : the_row();
  18. array(
  19. 'taxonomy' => 'taxonomy',
  20. 'field' => 'slug',
  21. 'terms' => the_sub_field('category_taxonomy')
  22. ),
  23. endwhile;
  24. endif;
  25. ));
Add Comment
Please, Sign In to add comment