the_field()
is an ACF function and will echo
content. It follows the WordPress (somewhat) pattern whereby functions with the_
at the front will echo
content and functions beginning with get_
return content.
Displays the value of the specified field. (this is the same as “echo
get_field($field_name)”)http://www.advancedcustomfields.com/resources/functions/the_field/
Using the wrong function, as you have, will cause data to output in the wrong location. Use get_the_field()
instead.
Related Posts:
- Using ACF field in do_shortcode()
- possibility to control embedded video timeline with buttons and links external to the player
- Problem with using custom shortcode with ACF WYSIWYG field
- Can I wrap an unordered list inside a shortcode?
- Create shortcode in WordPress, using one variable in 3 functions?
- Shortcode default attributes over-riding non-default attributes
- Image Shortcode from ACF ID
- How to Generate html tags using shortcodes?
- Pass fileurl parameter into shortcode from Advanced Custom Fields
- Custom Shortcode + Querying and Ordering Posts using multiple Advanced Custom checkboxes
- Ordering get_terms with ACF not displaying all terms
- Adding a custom field to do_shortcode [closed]
- Shortcode strips formatting and returns at content top
- ACF repeater + group shortcode
- Need help in setting up a transient using API Key and if possible updating it in the ACF field
- Shortcode custom query not passing value
- If statement shortcode
- Use ACF array values in shortcode
- how to add acf value to other plugins shortcode?
- How do I use “while” and “end while” inside of the echo do_shortcode with ACF Repeater?
- How can I hide the ACF shortcode when empty
- Shortcode outputs at the top of the_content
- Combining shortcode and get_template_part
- Escaping quotes from shortcode attributes
- How to detect if a Shortcode is being called on a page?
- How to get current page title inside a page itself in a shortcode and in page content
- Short code to display a loop
- shortcode inside another shortcode
- Custom Shortcode AJAX 400 Bad Request
- WordPress core responsive video not working with shortcode
- conditional shortcode not working
- Wraping $content into link with shortcodes
- nested Shortcode doesn’t work
- Rewriting WordPress Gallery Shortcode with Bootstrap Carousel
- other shortcodes in Contact form 7 MAILS [closed]
- Remove empty p-Tags in Shortcode content before non p-Tags
- What is a short code?
- Wrap shortcode inside custom block
- Instagram URL is converted into oEmbed
- Shortcode with no attribute but has value
- Creating a shortcode based on users preferences
- Get a post’s thumbnail url or display default image in shortcode
- basic shortcode – Why 1st paragraph not wrapped in p tag, but 2nd is
- unwanted P tags in shortcode, delay wpautop not working
- Shortcodes and a list of IDs?
- Include tags in the body of a post
- no content after shortcode
- Remove shortcodes that are different (but same pattern) in each post
- Place a URL parameter value inside a WordPress short code
- Shortcodes in excerpts returning empty string
- Scripts for shortcode: concatenate or load separately? [closed]
- Print shortcode in defined area
- WordPress shortcodes are not working
- Conditionally Loading JavaScript/CSS for Shortcodes
- How to use/enable Pagination?
- Wrap Shortcodes and wpautop
- Shortcode called twice
- Favorite websites with shortened hyperlinks
- Best way to find all shortcodes that come with WordPress
- Using Variables in Shortcodes
- Add JS in footer via shortcode?
- Shortcode syntax errors
- Displaying audio player as preview in audio post in WP3.6
- How to edit blog page in wordpress? there is no place to put shortcode
- How to transform WordPress user role code to WP shortcode?
- Does short-code slow down my WordPress site?
- redirect if shortcode exists
- How to use a nested shortcode to render the value of an attribute in parent shortcode
- ob_get_clean(); doesn’t return $value in shortcode?
- Which wordpress function is the caption shortcode linked to?
- Content between shortcodes
- Parsing a shortcode through an author meta textfield
- Adding YouTube button to TinyMCE editor
- How to find out what handler is registered to a shortcode
- do_shortcode within a shortcode
- tiny_mce_before_init preventing custom shortcode icon appearing
- Custom Fields – Boolean Display of True/False to Yes/No
- How to display NextGEN gallery in templates?
- Twitter bootstrap tabs
- jQuery Tabs in Shortcode API
- Echo Extra Shortcode HTML to wp_foot
- How can I use a plugin shortcode inside of a html form?
- Disable wpautop on Shortcode attributes
- remove shortcode pagination for specific url referrer
- Shortcode PHP file for two conditions passed when do shortcode
- update_metadata() appends shortcode data for every page refresh
- Add audio file to post using custom term meta field as link [closed]
- Display tags cloud from a specific category ID with a shortcode
- Shortcode appeared twice on page, one time before content, one time where it’s really called
- How to list child pages with excerpts, e.g. [child-pages depth=”1″ excerpt=”1″]
- Video shortcode outside WordPress not working with IE and mediaelement’s Flash fallback
- Inserting a variable into a shortcode inside php
- Shortcode for Admin Theme Option?
- Clarify: Enqueueing scripts within shortcode only loads in footer?
- What makes a placeholder resizable in Tinymce?
- Create plugin/function to catch XML-data via Shortcode
- Shortcode conversion to hrml when post is published
- wordpress how to sort posts on custom data with plug-in “Search & Filter”
- How to reuse php templates as shortcodes?
- Shortcode attributes from meta query variables