Support

Account

Home Forums Front-end Issues Displaying a shortcode placed in a custom field

Helping

Displaying a shortcode placed in a custom field

  • Hi I recently installed Meta Slider and Carousel with Lightbox with the goal of having a plugin that could display a gallery/carousel for each post if needed.

    So I installed ACF hoping that I could create a custom field to be placed in every post and give it a default value of “[meta_gallery_slider]”. How the Meta Slider plugin works is that you can either pre-make slides if you want and then place the respective shortcode for those slides in whichever post/page you want, or you can go in whichever post you want and add your slide images in the meta box provided below the content area and then simply insert the shortcode “[meta_gallery_slider]” anywhere in the content body.

    I mainly want the user to just add images using the meta box provided and then it would automatically be showed on the front-end view of the post so they wouldn’t need to manually add the shortcode to the post which is why I added the custom field from ACF.

  • Only the WYSIWYG field will automatically run shortcodes. Look at this page which has an explanation of how to have other fields run shortcodes https://www.advancedcustomfields.com/resources/acfformat_value/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.