Run shortcodes from a custom field.

By default, WordPress Custom Fields display any of the string you enter, as plain-text. In same way when you try to execute a shortcode, (in the format [shortcode] VALUE [/shortcode]) you end up displaying the entire text, including the html tags.

This is because, Wordpress do not run shortcodes added to custom fields.

However, you can run shortcodes from a custom field by, using a snippet while calling your custom field in template file.

No comments:

Post a Comment