Custom Field in backend to dynamic text in post

Support MB Custom Post Type Custom Field in backend to dynamic text in postResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30461
    SteevnSteevn
    Participant

    Hi,

    I don't really know where yo put this. Hopefully this is correct.

    I'm trying to create a post type (eg: documents) in which I have put a couple of pre-made documents (eg: privacy policy). The client can go find that post, open it up and fill in custom fields (eg: Company name, address, ...), and after updating the post, the fields are automatically updated in the document.
    The document is created in the basic Gutenberg WordPress editor.

    Is there a way to create a custom field set (group) for a custom post type, in which if you fill in the custom fields, those fields update certain words in the Gutenberg editor.

    Example:

    Custom field: [NAME] = Steevn

    Gutenberg Text:
    This is the document of [NAME].

    Text on the frontend:
    This is the document of Steevn.

    Hopefully this is possible and thanks beforehand for the help!

    Beste regards as well

    #30464
    Long NguyenLong Nguyen
    Moderator

    Hi Steevn,

    You can add the helper shortcode [rwmb_meta] to the paragraph to show the custom field value on the frontend. Please get more details on the documentation https://docs.metabox.io/shortcode/

    Or follow this documentaitont to know how to create a custom block to show the field value https://docs.metabox.io/extensions/mb-blocks/

    #30465
    SteevnSteevn
    Participant

    Hi Long,
    The shortcode works beautifully, thank you very much!

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