This is not really a WordPress question.
However you probably need the implode php function, using a comma as glue.
foreach( $fields as $field ) {
$value = get_field( $field['name'], 'user_'. $author_id );
if(!empty($value)) {
if ($value) {
$v = implode(',', $value);
}
}
}
Related Posts:
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- Run shortcode at certain resolution
- Advanced Custom Fields: Post Object – Not returning data [closed]
- Trigger popup in a php if/else statement
- How can I add multiple ‘tax_query’ arrays via a loop?
- ACF page while loop breaks footer while loop
- Using Advanced Custom Fields to create a per page slider
- Creating own shortcode – echoeing php variable based on JS variable
- Redirect to another page using contact form 7? [closed]
- 2nd page displaying the exact same posts as my first page (minus the very first post)
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- Calling PHP Titles inside Javascript Markup
- Including Custom fields within the_content
- How to store checkbox data for individual users?
- using shortcodes inside gravity forms
- Get title of page containing post grid within the posts
- ACF values to Script with auto refresh
- Advanced Custom Forms PHP formatting for do_shortcode
- ACF – Get ID of relationship field in flexible content
- Filtering custom posts by using checkboxes for taxonomy in an ajax loop always gives server 500 error
- Show the subcategory name based on current product
- Javascript Tab Gallery with Advanced Custom Fields
- Pulling Products from an API
- Replacing entire tag with shortcode – JavaScript [duplicate]
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- ACF background-color per post in a WordPress loop
- Generate a radius search of custom post type locations
- PHP for loop not working as intended
- Force ‘permanent’ post cache of shortcode results
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]
- How can i iterate through this shortcode array?
- ACF loop and php formatting
- How can I put a custom field as the link of a button shortcode?
- the_post_thumbnail unless video id is added
- Custom field within shortcode
- Set variable in javascript and using in my shortcode
- Is there a better way to output HTML as a shortcode?
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- Calling a function via a shortcode in javascript
- How to make this shortcode not refresh the whole page when i use it on frontend
- Can an array be used as a meta_query value?
- Display notification only once
- Access/update database with jQuery
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- Use WordPress’s Media Uploader/ Manager in non WordPress php application
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- Get/Set wp.customize.previewer.previewUrl
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Custom Loop through category menu to include sub categories
- Recent post display using shortcode
- javaScript in section of WP API
- Browser title script ignoring is_page /else conditional [closed]
- When would you use $_post instead of $post?
- How do I turn a shortcode into PHP code?
- Nested shortCode functions in the functions.php file
- Placing the_content inside shortcode not working
- admin-ajax.php responding with 0
- Put php variable in shortcode
- Using wp_localize_script to store the template url into a variable to use in JS
- Output 2 items within the Loop
- How do I display the function the_content in this loop?
- How can the plugin directory path be returned into ?
- get_page_by_title with an apostrophe in variable
- Show Custom Taxonomy Title
- Need to turn this php into WP shortcode
- Making Quote Plugin more efficient
- How to exclude specific category from the get_the_category(); array
- Autogenerate shortcodes from an array of strings
- Way to display “Yesterday”, “Today”
- How to limit the content coming from wordpress shortcodes?
- How can I add tinymce editor in WordPress with jQuery?
- How to speed up admin-ajax.php in wordpress
- How can i display post loop in table format?
- How to return a foreach inside a shortcode
- JQuery not working on WordPress Admin page [closed]
- Customizer Show/Hide
- spliting posts into two columns
- Page Reloads Before AJAX Request Finishes
- ACF check if variable has http, if else return string
- Must Use Plugin Causing Query Error
- Placing raw HTML inside a WordPress shortcode
- How to get to a specific position in wp_query?
- How do I add text in a shortcode?
- How to speed up a wordpress function with multiple loops?
- How to Insert Shortcodes into Theme?
- Facebook “like” open graph meta in header.php
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Custom excerpt function re-factoring
- How can I show the post thumbnail from the most recent of a certain post type, in widget?
- Looking for most performant way to execute several similar WP queries within shortcodes
- ACF: Only get first row of a Repeater Field
- How can I get content inside one shortcode to another shortcode?
- How to make custom total price reactive in navigation
- Adding tawk.to code just before body tag on functions.php file
- Template part inside shortcode, unexpected reult
- How do I fetch all comments per post via WP REST API?
- Deregistering a script in WordPress seems impossible
- Slide in Panel WordPress Post