Normally WordPress does not run shortcode that you put into a custom field.
By default, Custom Fields display whatever value you enter, as plain-text, so if you try entering a shortcode, (in the format [shortcode] VALUE [/shortcode]) you’ll end up displaying the entire text, including the tags.
Add the following in your template file, it can be single.php or page.php:
echo apply_filters('the_content', get_post_meta($post->ID,'YOUR_CUSTOM_FIELD_NAME', true));
or…
$shortcode = get_post_meta($post->ID,'YOUR_CUSTOM_FIELD_NAME',true);
echo do_shortcode($shortcode);
Related Posts:
- shorthand syntax for custom fields
- How To Show Shortcodes In WordPress Custom Fields?
- How to display data from custom fields in my custom shortcode?
- How to display custom field in woocommerce orders in admin panel?
- How to display random users with avatars
- Add new “Insert Into Post” button with another function
- Creating a table from shortcode avoiding wpautop for each row
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- Stripping shortcode from custom excerpt function
- how to create shortcode in wordpress
- Display random text from a file with the WP built-in AJAX API
- Set first oembed in post to a global variable or function
- Formatting post content to exclude gallery
- Problem with extract() with custom shortcode
- Shortcode to insert menu in page body?
- Using locate-template & shortcodes doesn’t appear to work
- Displaying a random user with a shortcode
- Assign category using custom field?
- Function to Download External Images to My Site
- Function to show only first instance of shortcode
- How to use max and min values of custom fields
- creating shortcode to pull json array
- Pass Shortcode Attribute to footer Script
- Customizer field value into functions.php variable
- Detect Safari desktop browser and include the detection in a shortcode
- My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)
- Display gallery on top before content
- List child pages of specific page using shortcode
- How to extract the variables out from “add_shortcode” function?
- Auto delete post if certain custom field data is empty
- WordPress shortcode attributes for database SELECT?
- create shortcode to list users with specific meta key value
- Variable if post is sticky in functions.php
- Display post shortcode content in the sidebar?
- Using shortcode content with nested shortcode
- Removing custom meta data
- How can I make a widget shortcode to control all the widgets?
- Custom shortcodes not inserting into visual composer columns
- Setting youtube size in functions.php
- Adding a colorbutton in tinymce dialog with current api
- Excerpts are not displayed by a shortcode on category pages
- check if the user is owner of current page
- shortcode help require
- ACF not showing
- Optimizing a WordPress site
- Use html inside shortcode function
- How to get correct value from checked()?
- wp_nonce_field is breaking form for reasons unknown
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Function shortcode – Set Parameter
- Using multiple line variable inside a function?
- Echoing function into WordPress NextGen gallery
- Output loop to function return?
- How to echo the value of an array element using a function via a shortcode
- Wp-query Order By problem
- How to parse a shortcode within a shortcode?
- Variables not showing in short code
- How to include any template using Shortcode fuction?
- Need to convert image url to a Base_64 data url with wordpress function..
- Insert Address fields into function
- How to create shortcode with html and php content?
- Shortcode question
- How add body_class from wp_termmeta
- How do I display a date correctly that is stored in the database as a backwards 8 digit number from Advanced Custom Fields? [closed]
- Shortcode to get featured image of specific id post
- Modify shortcode to work with custom post types
- Fill empty custom field with other custom field
- show all the posts thumbnails
- grab or load text on demand
- Problem with shortcode inside a shortcode
- Updating Metadata with Shortcode
- Need help making a short code work
- Display a list of random terms from custom taxonomy with shortcode
- Load templates, pass arguments, and render output from functions.php
- Passing function arguments via a shortcode
- Probleme shortcode with list author
- Last updated posts shortcode in functions.php
- Shortcode to output category description by passing ID
- Help using ShortCodes to style whole chunks of the post
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- Hide empty custom field
- HowTo: Add wrapper to columns shortcode?
- Shortcode Function – Can’t get anything else to return after running shortcode within shortcode
- How to echo the translated custom field?
- Custom shortcode with do_shortcode and substr
- How to exclude posts with empty and non-existent relational custom field with meta_query?
- Can I use a function to return HTML and the result of another function?
- Dynamically generated Navigation Diagram using Custom Fields
- Adding custom field in menu options [duplicate]
- Problem in shortcode outputting content
- Expanding a function to call a plugin or show a link
- Trying to the deduce shortcode from a function
- Pull random comment from specific post, display on homepage with shortcode
- Run function from parent on child site
- Add custom fields after post/page title
- Shortcode Variations?
- Custom shortcode not being included in content paragraph [duplicate]
- Creating mixture of shortcodes to use in the visual/text editor
- PHP error in shortcode [closed]