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
- WP get_terms and ACF field
- export and import taxonomy terms from one taxonomy to another
- Can you hide empty terms using get_term_children?
- save custom term – hook create_term doesn’t work
- get_term_by works but get_terms doesn’t?
- URL rewriting taxonomy term
- Display empty custom taxonomies differently than with one with posts
- Find terms in a custom taxonomy based on the hirearchy
- Double slash in the_terms URL
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- How to call a custom taxonomy term name inside a function?
- How to show post for a particular term of custom taxonomy?
- How to add custom taxonomy terms to posts in bulk
- Wp_query…a type of term a different div
- How to get this value inside RETURN
- How to list Custom Taxonomy
- Hide echo of no categories from get_object_taxonomies
- How to add a date creation field when a custom taxonomy relationship is created?
- Why can’t I access Custom Taxonomy metadata?
- query to use to link to taxonomy single page
- Custom Taxonomy List with Children
- List terms of custom taxonomy if matches other taxonomy
- Adding Child Terms Programatically – No Warning but No dice either
- Custom Taxonomy dont save in a frontend form for post a custom post
- SQL / wp_update_post: change post custom field to CPT post taxonomy
- How to output taxonomy term (incl. link to archive) on author.php?
- why the archive of custom taxonomy term shows nothing?
- Show all terms in a custom taxonomy with all child terms wrapped in a ul
- Order taxonomy terms wordpress
- Show single Child Category on Custom Post
- Filter by Custom Taxonomy AND Custom Field
- Page for custom taxonomy
- Can You Build Page Templates Without Extra Files
- Running a function only once when a taxonomy term is changed
- Unable to get the Parent Custom Taxonomy Terms
- How to get the term description in a taxonomy term archive query?
- Display Child Categories of Current Post ID
- Extra Meta Data for WordPress Multisite Taxonomy
- Set post terms by term id
- Taxonomy or Custom Field
- Unsetting post_tag taxonomy breaks term description for other taxonomies
- How to list terms by first letter, as in A’s then B’s etc
- Displaying my custom taxonomies in a using the_term_list()
- Use wp_list_categories to list parent categories from actual term
- Why do my quick edits for custom taxonomies not show on the post frontend?
- Include get_term_link inside search
- Trash Bin for Categories?
- Is there a way to nest taxonomies or custom fields deeper than one level below the post type?
- using wp_insert_term to create custom terms for a custom taxonomy from frontend form,
- ACF – Retrieve custom taxonomy from a relationship field
- is there a way of getting term children that only shows those from two taxonomies
- Pull data from MySQL and add it to terms
- Display term picture of each post in a loop
- Set two terms for a post when they differ only by an accent
- get_field values for each post on home page using wp_add_inline_style
- How can I show links for custom posts group by taxonomy current term and sub-term?
- Get Terms of custom Taxonomy of products with certain Product Category
- Create multiple taxonomies with custom fields values on the fly when creating new posts
- display ACF repater field in archive page
- Echo ACF taxonomy field within a foreach for another taxonomy
- 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
- How to list custom taxonomy terms alphabetically by last word
- new custom filed not showing in taxonomy
- Custom field with terms from another taxonomy programmatically
- Tree view wp-admin terms
- Retrieve the child terms by having the parent’s information
- Infinite Scroll appending Next Product Category Term pages
- Query Product categories what have a custom field
- add pagination in wordpress page template
- Convert post meta to custom taxonomy?
- Get custom taxonomy terms that contain posts that have another taxonomy term
- Order get_terms by count using a custom taxonomy hierarchy
- Connect ACF field + custom taxonomy [closed]
- Display Custom Field or Custom Taxonomy in front page /post/product
- Listing Cities A custom taxonmy by selection order
- Cloning product not copying custom taxonomies
- ACF – Can’t get custom post type by taxonomy
- Add A CSS Class To A Menu Item When A Custom Taxonomy Term is Present On Single Post