Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. $args = array('fields'=>'all');
  2. $terms = wp_get_post_terms( $post->ID, 'customtaxonomy', $args );
  3.  
  4. foreach ($terms as $category) {
  5. $cat_id = $category->term_id;
  6. $post_id = 'customtaxonomy_'.$cat_id;
  7. $value = get_field ( "example", $post_id );
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement