Avoiding Custom Field Duplication Across Multiple CPTs in BricksBuilder

Support MB Custom Post Type Avoiding Custom Field Duplication Across Multiple CPTs in BricksBuilderResolved

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #45857
    Tobias HaasTobias Haas
    Participant

    Hello Metabox Team,

    I have created several fields using Metabox and assigned them to some custom post types (CPTs) as I intend to use them there. Now, I am attempting to create a template with BricksBuilder and select the field for my phone number, for instance. This is the display I receive:
    Bricks builder Dynamic Data

    Currently, I can select the same field for each individual CPT. However, I would prefer to have a global field so that I don't need to create a template for each CPT. Is this possible? If so, how can it be achieved?

    Thank you for your assistance.

    Best regards,
    Tobias Haas

    #45858
    Tobias HaasTobias Haas
    Participant

    https://imgur.com/a/LR3h9fq

    #45866
    PeterPeter
    Moderator

    Hello Tobias,

    If you want to have a global field, please consider using the settings page with custom fields like the theme options. Please follow the documentation
    https://docs.metabox.io/extensions/mb-settings-page/

    #45869
    Tobias HaasTobias Haas
    Participant

    I probably expressed myself a little wrong. By global I meant that I can use it on every CPT and in the same template without having different fields.

    Instead of this
    {mb_restaurant_telefon_standort}{mb_einkaufen_telefon_standort}{mb_freizeit_telefon_standort}

    i want just this.
    {mb_telefon_standort}

    #45877
    PeterPeter
    Moderator

    Hello,

    There isn't a global custom field. A field has to be associated with a post. You can create a specific field group with some fields and assign it to more CPTs. Then you will have the same field ID for all posts of those CPTs.

    #45891
    Tobias HaasTobias Haas
    Participant

    Can you be a bit more specific here, I still don't understand. Where exactly do I do that? Is there an article about it?

    #45897
    PeterPeter
    Moderator

    Here is an example https://imgur.com/2XScFBN
    create a field group with some specific fields and assign the field group to more CPTs.

    #45898
    Tobias HaasTobias Haas
    Participant

    This is what im doing! 🙁
    https://share.cleanshot.com/jzr1kxfS
    https://share.cleanshot.com/v09Ln0lZ

    #45904
    PeterPeter
    Moderator

    If you check the field ID and value in the database, table wp_postmeta, you can see the meta key is the same for posts in other post types. I think Bricks builder automatically adds the CPT slug to their variable. You can ask Bricks support to get more information.

    #45909
    Tobias HaasTobias Haas
    Participant
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.