Replace the_field
with get_field
. The former echoes data without the need to explicitly call echo
on the function name, the latter returns data, which is what you need when storing data against a variable for later use in your function. In your case, concatenating the first/last name prior to its output. That should fix your list.
Although the tags have been edited (thanks toscho), in case anyone is wondering, since it’s not clear in the OP, the function the_field
is not to be confused with the native get_post_meta
(and other) WordPress functions that handle retrieval of post meta data. Instead this particular function and it’s counterpart in get_field
are part of the plugin “Advanced Custom Fields”
Related Posts:
- Get value in custom field with taxonomy [closed]
- Order get_terms using a Custom Field
- Remove Category description textarea
- Advanced custom fields – taxonomy terms images [closed]
- Automatically assign taxonomy term if custom meta value exists
- Outputting an array of term meta values in a custom WooCommerce tab?
- Operations with custom fields values in a loop
- Print terms with taxonomy and metabox value
- Can I use a Custom Meta Value inside of ‘get_the_terms’?
- Search Tool only refreshes Page without showing results
- Display value of custom field of custom taxonomy in single post?
- How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?
- WordPress implode & wp_insert_post question
- How to support fifteen thousand terms in WordPress?
- Can’t get taxonomy ID for each post on archive page
- Show related posts on single.php, grouped by taxonomy terms, with Advanced Custom Field post object selected
- How to use custom slug and custom templates for custom taxonomy?
- Count tags for current post and save into custom meta field (and update it on post edit)
- Create new Taxonomy, add extra fields, register terms AND extra fields values?
- ACF Custom field not showing in Timber Taxonomy page
- How to filter a taxonomy meta field to the ‘single_term_title’ filter hook
- Get the the top-level parent of a custom taxonomy term
- get_terms – only top level
- How to only list the child terms of a taxonomy and not their parents?
- Hierarchical taxonomy UI
- Add custom taxonomy fields when creating a new taxonomy
- How to modify the query in taxonomy-custom.php to sort term archives by a custom meta field?
- Can I lock down custom taxonomies on a parent term level, but not a child term?
- Get only the first term by taxonomy
- get_terms() returns an empty array
- Custom Taxonomy Only Showing Top Level Terms in Admin?
- register_rest_field for custom taxonomy fields that are assosiated with custom post type
- Is it possible to get a Previous/Next Taxonomy term archive URL?
- WP_insert_term how to insert multiple values as taxonomny term?
- Custom Taxonomy Images with Advanced Custom Fields
- Custom taxonomy term as class?
- How to edit/remove a term that’s in multiple taxonomies?
- How to display term description in empty terms archive?
- get_terms custom order
- how to create a proper query for getting a list of users with taxonomy related meta key
- How to add custom field to custom taxonomy in 4.4
- Generic taxonomy-term template page
- Get direct children of custom taxonomy
- List subcategory on taxonomy term page
- How to insert an array of terms using wp_insert_term?
- display taxonomy slug from term ID
- list/consult Taxonomy only for the respective author/creator in dashbboard
- How to use get_the_terms() to display multiple terms?
- List posts of term on term’s admin edit page
- get_term and get_term_by return null or false, even though term exists
- one term two taxonomy’s?
- Conditional display for custom fields/taxonomy
- How do I modify the “Insert Media” lightbox in the admin to only show media items from a category?
- Getting WooCommerce product related child categories
- How do I display a custom field from a custom taxonomy in single.php?
- List Posts For Terms Of A Custom Taxonomy For Any Post Type
- Query posts from a child taxonomy term id
- get_terms() duplicate first term of a custom taxonomy
- Best structure for entering recipes in a WordPress theme?
- Having Issue on Passing Variable into HTML Class Tag
- Echo custom taxonomy slug
- Admin (All posts) stop responding problem
- Copy/clone/associate Custom field to Custom Taxonomy
- Query posts using custom taxonomy and selected terms
- Proper use of wp_get_object_terms
- Remove a href from this code
- Output all terms in a custom taxonomy and add a “active” class only to the ones attached to the current post
- one post per term taxonomy
- How can I change the output display of my pagination?
- Terms change id after importing
- delete term from taxonomy and assign in new one
- How to add a date creation field when a custom taxonomy relationship is created?
- Why can’t I access Custom Taxonomy metadata?
- Adding Child Terms Programatically – No Warning but No dice either
- Running a function only once when a taxonomy term is changed
- Set post terms by term id
- Taxonomy or Custom Field
- Displaying my custom taxonomies in a using the_term_list()
- Use wp_list_categories to list parent categories from actual term
- Trash Bin for Categories?
- is there a way of getting term children that only shows those from two taxonomies
- get_field values for each post on home page using wp_add_inline_style
- Problems using get_the_terms in a plugin
- How to add a shortcode function that returns the taxonomy slug of the actual post within the loop
- Tree view wp-admin terms
- Retrieve the child terms by having the parent’s information
- add pagination in wordpress page template
- Convert post meta to custom taxonomy?
- Order get_terms by count using a custom taxonomy hierarchy
- How to create a non removable taxonomy term?
- Is it possible to sort the post based on a custom field?
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- qtranslate-x problem with custom term description
- How to add meta fields to custom taxonomy add/edit page?
- Sorting terms individually for each post
- Any way to make custom taxonomy field searchable?
- How do I create a term for every value of a post meta?
- Taxonomy Child Not Updating Unless I Click Update Twice
- How to show to show post list under the specific category name using jetengine query?
- post_type_link not working for posts without terms