Wordpress custom post terms
Budget: ₹600 – ₹1,500 INR
Need to retrive the terms of a custom taxonomy, but for each post
Currently using this which works, but it retrieves all the terms not the one for each post
$filters = wp_get_object_terms( $posts_in_post_type, 'filters', array( 'ids' ) );
//echo sizeof($posts_in_post_type);
if (sizeof($filters) > 0){
foreach($filters as $filter):
echo '<option value="'.$filter->slug.'">'.$filter->name.'</option>';
endforeach;
}
Currently using this which works, but it retrieves all the terms not the one for each post
$filters = wp_get_object_terms( $posts_in_post_type, 'filters', array( 'ids' ) );
//echo sizeof($posts_in_post_type);
if (sizeof($filters) > 0){
foreach($filters as $filter):
echo '<option value="'.$filter->slug.'">'.$filter->name.'</option>';
endforeach;
}