If you’r using ACF
plugin you should look the documentation first, here’s relevant
ACF saves taxonomies terms meta to options table, and they can be accesed using get_field( "{$field_key}", "{$term->taxonomy}_{$term->term_id}" );
So in you’r example it would be:
$image = get_field( 'featured_image', 'product-category_' . $product_category[0]->term_id );
Related Posts:
- 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
- ACF – Retrieve custom taxonomy from a relationship field
- Display Custom Field or Custom Taxonomy in front page /post/product
- Custom Sort Order for Custom Post Type Taxonomy
- How to Add Custom Fields to a Custom Post Type?
- clients list using wordpress
- Filtering a WP_Query meta_query by numeric values isn’t working
- Custom Taxonomy Template Post List with Sort Order
- Filter a custom field based on selection of another custom field (ACF) [closed]
- How to do a custom bookmarks post type?
- How to sort a table of custom posts by column containing custom field
- How to select one major category (or custom taxonomy) for a custom post type?
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- front end radio custom taxonomy with custom post type
- get terms that have post with custom post type between 2 values
- What is better: Custom Fields vs Custom Taxonomies with Terms for perfomance, scalability and better user experience
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- How to add custom fields to admin UI and REST API response?
- Display posts if a custom field value is equal to another custom field value
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Linking three taxonomies with ACF
- Query Custom Post Types by date (custom field) range
- Automatically populate a hierarchical taxonomy from a custom field
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Custom Post type and Custom Field WP_Query
- How to change post featured image using a custom field of category?
- get_posts of Custom Post Type AND Custom Taxonomy
- How to bulk copy custom fields between custom posts?
- How can I dynamically add a post to a custom post type which uses a custom field?
- WP_Query order by custom field, then randomly order some of results
- Meta Query Not Returning Output Despite Having Matching Values
- ACF From & To Date Validations
- How to render a custom post type template with custom fields using shortcode
- First custom field value (out of several) displayed twice after query
- Multiple Frontend Filters Using Advanced Custom Fields
- 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?
- Custom post type’s extra fields – how to handle?
- Creating custom post type with custom taxonomy and custom fields programatically
- List of users that clicked a ‘Join’ button at single post
- 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
- How to get_term_meta on single custom post?
- 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 to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- Custom post type name and assigning custom taxonomy
- Group by custom field value (start and end times)
- Custom post types, disable fields
- Building a Portfolio and need some direction
- Excerpt length: get first paragraph
- Making a form for user to add new custom post with custom taxonomies and custom fields
- 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
- 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 front-end form for adding post – Category problem
- Create loop from selected terms in ACF taxonomy field
- Sort custom posts by date and then by taxonomy
- WP_Query not using custom taxonomy categories on custom post type
- Filter posts by their related field’s custom field
- wp_insert_post deleting previous post custom meta
- I want to create a metabox under custom taxonomy
- Taxonomy shows up twice on Custom Post Type
- Adding a Section for Visitors
- Query posts by multiple custom fields
- Custom taxonomy template for custom fields loop [closed]
- Best way to have one product in both rental and sale parent category
- Create Inclusions and exclusions
- How do I display specific custom posts, and how do I edit a post’s singular page?
- What’s the most efficient way to get two queries based on an if statement?
- Automatically convert standard posts with custom fields to custom post types
- Best way to use Category & Custom Fields?
- Get month and day from a Date Picker custom field
- How to query posts by meta keys AND under specific category?
- predefined custom field on registration page
- Show Custom Post Type taxonomy term that matches custom field
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- Order by custom field attribute
- Advanced Custom Fields: query posts filtered by multiple field values
- Advanced search form with filters for custom taxonomies and custom fields
- Custom post type and custom taxonomy archive inaccessible
- How to change order of custom post types. I want Featured post to come first
- Retrieve a post with its ACF repeater fields in wordpress
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Display ACF object field data using Elementor Custom Query
- pre_get_posts causes Custom Posts appear under ‘Pages’ menu
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes
- Post object GUID adding http:/