Custom Fields
Re-Envisioned
Support General Shortcodes - integration with Gutenberg, and how to use them inside a link

  • Creator
    Topic
  • #27529
    OldGreg
    Participant

    Hello,

    A couple of questions regarding dynamic data usage from custom fields.

    1) I see you support page builders like Elementor and Beaver, but I don't see an easy way to search for fields and insert them using Gutenberg. Gutenberg is the future - please let me know how we can add support for searching field meta ids inside Gutenberg and add them into our content easily.

    2) I would like to use the custom field value inside a link. When using a standard "link" in Gutenberg builder, I am unable to use the shortcode directly. How can we get the value of a field for the post being edited to include it in a tel: link (the field is a phone number).

    Thank you for such a great plugin!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #27554
    Long Nguyen
    Moderator

    Hi OldGreg,

    Thank you for reaching out.

    1. Can you please clarify the question? Do you mean to search posts by field value?

    2. There is an extension MB Blocks that helps you to create a custom block to use on the Gutenberg editor. You can create your own block and show the custom field value, follow this documentation https://docs.metabox.io/extensions/mb-blocks/

    #27585
    s.liem@me.com
    Participant

    I also do feel very lost, don't understand how to display custom fields of a post inside the post using shortcodes.
    Your forum is too crowded for finding relevant info, your documentation lacks real-life examples.

    I have created 2 custom fields "author" and "year".
    I have created a now post and entered "peter" and "2004" into those fields.
    I have inserted a shortcode inside the post: [rwmb_meta id="field_id"] as explained in your docs on https://docs.metabox.io/displaying-fields/, but none of the fields are being displayed 🙁

    Why you make it sooo complicated? Please help better to display fields via gutenberg via shortcodes, thanks.

    Sascha

    #27604
    Long Nguyen
    Moderator

    @Sascha,

    Did you replace the field_id with your real field ID? The field value will show on the frontend after saving the post. See more on my screen record https://share.getcloudapp.com/d5u1OkNN

    #27828
    s.liem@me.com
    Participant

    Thanks, now I have understood.
    I would recommend adding a sample use-case to each of your documentation for all those none coders among your clients 😉

    #27829
    s.liem@me.com
    Participant

    One more thing: I have created CF and now I'm able to display them on a post.

    I have now realised, when placing the shortcude inside a group, the CF will be displayed within the templates layout. but as soon as I place the shortcode between 2 default paragraph blocks, the CF will be displayed at the very left border of the page, not within the content section of the page-template:

    https://adhesiveknife.tastewp.com/2021/04/19/officia-expedita-et-ipsa-eaque/

    CFs are:
    author = "Peter Lustig"
    year = "1999"

    Here a screenshot from the editor:
    http://media.macbay.de/_support/asdiuvsdgf_263EF49F.png

    Any chance to help me further with this?

    Thanks in advance and have a lovely day 🙂

    Sascha

    #27847
    Long Nguyen
    Moderator

    Hi Sascha,

    The layout is controlled by the theme. You can wrap the first shortcode in a group with one column or contact the theme support to ask for help in this case.

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