Use get_field instead of the_field. That way you can assign it to a varilable.
$first_comment = get_field('first_content_block');
$second_comment = get_field('second_content_block');
echo do_shortcode("[vr_jsp] $first_comment, $second_comment [/vr_jsp]");
I haven’t tried it, but see if that works.
Related Posts:
- explode array within shortcode
- Change behavior of “Insert into Post” based on attachment metadata
- Add new “Insert Into Post” button with another function
- Call a custom field in an audio shortcode?
- Order posts by custom field and if custom field is empty return remaining posts
- wp_editor in add_meta_boxes does not show gallery
- Calling Specific Pages with wp query Part II
- Loop through two different sets of custom fields
- Custom field for default gallery
- Execute/Parse Shortcode in Native WordPress Custom Field Value Field
- How do I exclude posts by custom field value?
- Echo values from custom field outside loop php
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- Calling custom fields for pages (not posts)
- Duplicate posts being displayed when querying Custom Fields
- Loop to display random posts only if a custom field matches category
- Audio player shortcode not showing up when using variable
- Create WordPress shortcode with php code inside
- How can I show custom fields in the loop only to specific user roles?
- get_posts that match a user-specified value on a page
- Display WP-Types custom fields in post [closed]
- Accessing loop functions (e.g the_title or the_content) from post ID
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?
- Shortcode To Display Post Custom Field Value Inside Excerpt
- Limit the number of acf content when displaying in post loop [closed]
- Orderby is working with one query but not with other
- modify wordpress caption shortcode
- How to create a shortcode to print specific values stored in a post meta array?
- Is there a better way to list all database terms alphabetically?
- Change the main loop WordPress impact on the server?
- custom-meta-box checkboxes from loop won’t save
- Insert a custom field into a shortcode and use it in post(s)
- How to show a post if was published less than two hours ago?
- List users by sum of all their posts’ custom field values
- Custom wysiwyg editor doesn’t execute shortcodes?
- Custom Fields – How to create a list from multi-line entries of a single value
- shortcode in a custom metabox
- how to make nsfw post with thumbanil
- Custom Query based on custom field of a single post
- Efficiently sort only certain categories by custom field
- Can I access a post meta field before the loop?
- Can data from a Custom Field data be used by a shortcode on a per page/post basis?
- Displaying page image in the footer automatically
- Shortcode To Display Post Custom Field Value in Post Title, Post Content
- custom field (video/audio url) and embed functionality
- Show image if author meta (profile fields) exists outside loop
- IF Custom field value equals ZERO
- Can’t query by meta_key
- Display MP3 as media using an URL from a custom field
- Using a custom field inside a shortocde
- Loop through incrementing custom fields
- Enable a short code in the custom meta field
- Search Results Page – Displaying Custom Meta Fields
- Plugin or shortcode for ISBN number?
- Interrogate a page within a loop to check template type or custom meta data (Pages vs Posts)
- Collect Data from NEXT item while in loop
- How to pass custom field value to shortcode?
- How to show content of custom fields in search results?
- Custom field outside the loop and inside an array
- Display metabox title for custom fields with values
- use custom field value as post category in loop
- Replacing custom field with shortcode
- Filter or order based on custom field
- Compare ACF date field (if exists) and post date and order DESC
- What am I missing in this Code Block?
- get_field values for each post on home page using wp_add_inline_style
- Shortcode for Custom Field of Media Attachment (to use with Featured Images)
- how can i show WordPress custom field data to my short code?
- User Filter Options on Archive Page
- Search fails when using the radio buttons
- Custom meta boxes – add php code inside?
- Create Shortcode shows only posts with custom_field meta
- Outputting custom field on home.php not outside of blog list
- Output Custom Field value to shortcode
- PHP and Shortcode Combination
- Counting number of images from loop
- Metabox value for post loop?
- Stop truncation of shortcodes in custom text fields?
- Retrieving Advanced Custom Field within Shortcode Function [closed]
- Using ACF Custom Field value in a URL with do_shortcode() [closed]
- Get meta value when the page is a blog archive
- WP_query returns error when used for custom widget
- How can I put a custom field as the link of a button shortcode?
- Running a Gallery Shortcode in a Custom Fields Widget
- Custom field in a shortcode?
- I want my post to republish again after adding a custom field
- Insert wp gallery shortcode into custom textarea
- Displaying shortcode content inside custom field without images
- Display posts where date field matches current month?
- Filtering posts by WORD in custom field
- Parse Shortcodes in Theme’s Custom Field?
- Retrieve IDs from custom field, count and display results differently according to count
- Pagination not displaying correct number of pages
- Display custom field outside the loop
- Retrieving custom field as shortcode
- Custom fields doesnt work well with any postTAB plugin
- Custom field not showing
- How to include custom field in shortcode (do_shortcode) in theme file
- Shortcode not picking up custom field
- Order by a meta field in query loop