I managed to solve my issue by looping through a get_the_terms() function. In my case, I’ve also created a shortcode.
function display_taxonomy() {
$prognoses = get_field('prognosis');
ob_start();
if( $prognoses ):
foreach( $prognoses as $prognosis ):
$terms = get_the_terms( $prognosis->ID , 'my_custom_taxonomy' );
foreach ( $terms as $term ):
echo $term->name;
endforeach;
endforeach;
endif;
return ob_get_clean();
}
add_shortcode( 'my_custom_taxonomy_shortcode', 'display_taxonomy' );
Related Posts:
- Display Custom Field or Custom Taxonomy in front page /post/product
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Get Custom Field Values by Another Custom Field in WordPress
- Retrieve value of a category’s custom field
- How to group posts and get a mixed posts and groups view?
- How to get_term_meta on single custom post?
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- WP_Query not using custom taxonomy categories on custom post type
- Storing/querying custom date data
- Custom Sort Order for Custom Post Type Taxonomy
- How to Dynamically Filter Custom Post Types by Taxonomy Based on URL in Elementor Pro and ACF?
- How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- Bulk Update Custom Fields for Custom Post Types
- WP_Query order by custom field, then randomly order some of results
- Show custom post type relationships by taxonomy
- Query custom post type with ACF Date
- Meta Query Not Returning Output Despite Having Matching Values
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- ACF From & To Date Validations
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- Dynamic dropdown select values depending on other custom field value
- How to render a custom post type template with custom fields using shortcode
- Order Custom Post Type by Custom Field Value
- How to conditionally redirect to the post from a taxonomy page?
- Query Custom Post Type Taxonomy term with multiple parameters
- Hierarchy and access control for Custom Post Types (CPT)
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- First custom field value (out of several) displayed twice after query
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Search Tool only refreshes Page without showing results
- Multiple Frontend Filters Using Advanced Custom Fields
- Integrate Custom Post Type Events into Calendar
- How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Displaying custom field according to date
- Show fields based on taxonomy selection in editor
- Permalinks: custom structure for taxonomy – tags?
- WebP Fallback for Inline Background Image in Style Attribute
- Query based on custom fields start and end date
- Custom post type’s extra fields – how to handle?
- How to get a custom type post data when it has a connection with another custom type post?
- Creating custom post type with custom taxonomy and custom fields programatically
- List of users that clicked a ‘Join’ button at single post
- How to list tags from custom post type attachments?
- Targeting categories in custom fields
- Custom taxonomies to define versions of a product
- How to inherit field value from parent post into in child / sub post
- Custom Taxonomy Search result page
- Custome fields not displayed
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Many to many to many custom post relationships
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- How to define the template for custom posts?
- posttype and custom fields on multisite
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- How do I replace the post title with a custom field?
- Sum and count of custom field values
- How to fetch custom post types with its full data on wordpress?
- Reusable metabox backend and frontend
- How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- Get custom term meta problem on single post type
- Custom post type name and assigning custom taxonomy
- Group by custom field value (start and end times)
- Custom post types, disable fields
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Building a Portfolio and need some direction
- Custom post types category
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Custom Taxonomy dont save in a frontend form for post a custom post
- Custom Post type Query by Taxonomy
- Single.php for Custom Post Type > Taxonomy > Term
- Excerpt length: get first paragraph
- Making a form for user to add new custom post with custom taxonomies and custom fields
- Should i use custom post type for a custom footer?
- Order custom posts by taxonomy, then by meta_key
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Writing a custom Glossary plugin
- How do I ensure that post_type and Taxonomy use the same slug?
- add_filter get array data before display in custom post_type
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- Custom taxonomy terms as children of multiple custom post types
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Custom front-end form for adding post – Category problem
- Create if else for post types in WP_Query ‘post__in’ values
- Create loop from selected terms in ACF taxonomy field
- Sort custom posts by date and then by taxonomy
- Display Posts that fit a certain criteria on Category pages
- WP_Query not using relation key as expected and not producing any results
- Meta query with ACF relationship field
- Creating subpages for each custom post type
- ACF Pro simple Business Directory – Requesting assistance with created Templates and associated Functions.php Coding
- Category display using conditions
- Use Custom Field to Display Post Loop
- Custom fields disappearing when a custom post type is assigned
- How to automatically update ACF field value every year?
- edit index custom post type page with elementor or other
- ACF – Updating all posts of CPT when a custom field from options page is updated