I have a query string i’m running to call a load of information about a category before a loop of posts. I have created a custom field which I have added to the category taxonomy and for some reason or another I can’t seem to force the contents of the custom field to appear. The custom field is only to create a URL for a link on a button.
I’m using the following PHP to call the correct field.. but its not displaying: <?php echo $member_group_term->mep_party_link; ?>
I have used the other ones like name and description and they display ok.. but the custom field doesn’t seem to want to display at all.
Custom fields are not stored as part of the standard WP term information and they cannot be accessed like this. This is similar to to custom fields on posts.
For posts you need to use get_post_meta() to get the field in WP. With ACF you use get_field(). For term custom fields you still use the same ACF function but you must supply a post ID. You wan to echo the value so you can use the_field()