Hot answers tagged

2

Here is how i did it $taxonomy = get_terms('portfolio_category', array( 'hide_empty' => 0 )); i am able get all the items under portfolio_category.


2

You should be using get_the_terms(). wp_get_post_terms() queries the db to get post term info, where as get_the_terms() returns the post term objects directly from the post term cache and only queries the db if that info is not available. By default, all post's terms are cached by the query being executed. EDIT I cannot comment (crappy mobile), but there ...


1

You can pass the term object as the second parameter to the_field/get_field. echo '<img src="' . get_field( 'brochure_logo', $tax_term ) . '">';



Only top voted, non community-wiki answers of a minimum length are eligible