As per the ACF documentation, you must pass either the term and term ID or the term object to the get_fields()
function for a taxonomy.
So in your case, you would replace $tag_image = get_field('tag_image');
with:
$tag_image = get_field('tag_image', $term);
Related Posts:
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Load custom posts with same tag as page
- Meta Query “IN” doesn’t work with ACF checkbox filter
- List events by month
- Show ACF field from custom taxonomy and display on the single template
- Change message given when deleting post from custom post type
- Link users to a custom post type
- get_posts of Custom Post Type AND Custom Taxonomy
- Custom Tag Description unable to display just below and outside of the Loop
- WP_Query to select custom post type with Advanced Custom Fields (ACF) date
- How to update post meta on uploaded image from a custom form?
- Displaying custom field according to date
- Create short URL with auto 301 redirect
- Query entries from custom post type in an ACF flexible content field
- meta query not retrieving posts
- add custom tags for custom post type in wordpress
- Fetch data from two custom post types and create multidimensional array for output to html table
- Custom front-end form for adding post – Category problem
- count & sum the value of custom field of the author post in dynamic posts
- Grouping custom wordpress post types by acf value
- WordPress – display relationship between blog posts and custom posts
- Custom sorting in post columns by ACF Pro Select Field
- Load info from customposttype into template page
- CPT: execute code after load if parameter is set
- ACF Post Content Not Being Searched
- Display related post content and custom field content
- Group/list/sort custom post type posts by date in tabs from acf datepicker field
- Can’t pick up a field created with Advanced Custom Fields
- Get month and day from a Date Picker custom field
- WordPress Custom Post Type and sort by Tags
- using ACF datepicker to filter posts on a page
- Return all wordpress custom posts in specific multidimensional array
- Custom Post-type not returning the right child_of
- Query Custom Post Type by Tag
- Getting ACF relationship field information
- How to I add count of custom posts listed in a post as a prefix to its title
- Strip Characters From Tag Name
- Post loop count is not in order
- Control content before and after custom post type loop
- Custom Post not working as expected
- How to use a variable as a function name?
- Why does my taxonomy have a category style div id?
- Check IF single OR multiple custom data has been entered
- Get custom post type categories to show up in menus
- portfolio custom type tags support
- How can I create an automatic drop down menu with my tags?
- Saving fields in a drop-down in WordPress
- Need help deciding on a taxonomy
- display custom taxonomies limited to custom post type?
- Displaying custom post types as a gallery
- Assigning a category to a custom post type in WordPress
- How to inherit field value from parent post into in child / sub post
- How can I add a shortcode to query Custom Post Type with ACF in WordPress?
- Show current custom taxonomy
- finding and using post type fields in WordPress
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- Custom Post Type page sorts differently on different environments
- Postname on unique permalink structure appends “-2” for a custom post type. How can I get this to stop happening?
- Is there a way to create two template for single custom post type page?
- How exclude or skip post type with get_next_post_link
- set_query_params using custom params defined in functions file?
- WordPress: Custom User Role cannot access Custom Post Type | “Sorry, you are not allowed to access this page”
- Custome fields not displayed
- Get Posts by Category, Tag , and CPT Taxonomy
- How do I add custom HTML to the content of an archive page’s posts?
- Different options per post type in WP_Query
- Is it possible to have “two” sets of tags?
- After creating Custom post type by user delete old one
- WordPress admin display post type tags as checkbox
- The Difference Between Categories and Tags and Taxonomies and Terms
- widget_posts_args not using the number of posts in widget
- Show message when query has no posts
- ACF for custom post type archive pages: which hook to use?
- How To Post WordPress Custom Post Types to Twitter via IFTTT
- Pagination hitting 404 page on /page/4
- Get data from PHP to JavaScript to set position of each post on front page
- Undefined $post in wp_query
- Get posts from Custom Taxonomy
- How to define the template for custom posts?
- Show all Tags in each post
- How do I create a new post upon registration with the users first and last name as title
- Batch Extract Date from post title and put into ACF custom field
- Removing full title and breadcrumb header container for a specific post type
- Is it possible to use array_walk() to append terms to an array of posts?
- wp_get_canonical_url showing first url of the post for custom page
- get_post_types() can’t get some of my post type
- Creating a non-hierarchical Taxonomy that behaves like categories
- Why is wp api returning old acf values?
- How to use single.php for creating, reading and editing Custom Posts with ACF
- Creating shortcode id for custom post types
- When I choose category from dropdown then everything working fine.But in backend it checked only child not parent [closed]
- Shortcode is displaying the content on top of the page [duplicate]
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- Distribute Custom Post in different pages
- Filter content in shortcode
- get custom post type value in header.php [closed]
- Query custom post types & Taxonomies and list them in a table on a page
- Custom post type and custom taxonomy 404 on page 2
- Creating a “glossary” of WordPress posts of a specific post type
- Show current user posts in custom post type query