Render shortcodes in a loop via a template

Support General Render shortcodes in a loop via a template

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #40974
    michael@wdsaigon.com[email protected]
    Participant

    Hi

    Please see the FB post for details of my query.

    But the main overview is if it is possible to render a shortcode of a custom field from a service page CPT custom field which has been added to a testimonial post inside the testimonial CPT - This then gets displayed via a loop (bricks) in a template back onto the service page.

    Many thanks

    #40985
    PeterPeter
    Moderator

    Hello Michael,

    I think it is possible. But you need to use the code to render the shortcode in a WYSIWYG field value. And I'm not sure if the Bricks builder can help this case, you can contact their support for more information. Please read more on the documentation https://docs.metabox.io/fields/wysiwyg/#template-usage

    #41010
    michael@wdsaigon.com[email protected]
    Participant

    Hi Peter,

    Thanks for the reply,

    If it was not Bricks and I was applying it to say a Gutenberg loop, please could you let me know what the process would be? i.e. where to add the code you referenced in your last reply.

    Many thanks

    Michael

    #41026
    PeterPeter
    Moderator

    Hello,

    It's the PHP code to output the field value so you need to add it to the template file on your theme. If you want to output it in a block, please try to use the custom block of Meta Box. Please read more here https://docs.metabox.io/extensions/mb-blocks/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.