Custom Fields
Re-Envisioned
Support MB Custom Table Don't understand how to proceed after setting up custom table

This topic contains 6 replies, has 2 voices, and was last updated by  Adam M 6 months, 3 weeks ago.

  • Creator
    Topic
  • #13902
    Resolved
    Adam M
    Participant

    Hi, I’m trying to understand how to end up with admin interface screens (listing/add/edit) for custom tables that are similar to ones created for custom post types.

    I’ve created a custom table manually. I then created a custom field group that maps a bunch of custom fields to the custom table. I’ve made sure to check the “Use custom table” checkbox and to insert the manually-created custom table name into field “Table name”.

    What do I need to from here to reach my goal?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #13907

    Anh Tran
    Keymaster

    Hi Adam,

    The MB Custom Table hasn’t supported for custom content yet. It has to attach to a custom post type (or term/user) at the moment. In short, it helps you move all custom fields to custom tables. But not post type’s fields such as title, content, date, etc. These info needs to be saved in posts table as well.

    #13919

    Adam M
    Participant

    Anh Hi,

    Thanks for your response, but I’m not sure I understand what my next step should be after creating custom fields.

    I’ve gone ahead and created a custom post type, then gone into the previously-created Field Groups definition, and under “Settings” I’ve set “Post Type” to the newly-created custom post type, “Tracking”. I’ve left “Show for” as “Posts”.

    Now when I go to “Trackings > Add new” for the new post type, it’s allowing me to insert all the fields I defined. But when I click “Publish” and check the post, none of the custom fields retained the values that I entered.

    What am I doing wrong?

    #13927

    Anh Tran
    Keymaster

    Hi Adam,

    Are you using Meta Box Builder to create fields? Do you want to store custom fields value in post meta (the normal WordPress way) or in a custom table? I’m quite confused since your first post is about custom table, but the 2nd one is not.

    Anyway, can you post some screenshots so I can see what happened?

    #13933

    Adam M
    Participant

    Are you using Meta Box Builder to create fields?

    I set up a new table with fields directly in the database. I then assumed that I need to set up fields in Meta Box Builder to enable me to list/add/edit content in that table from within WordPress.

    Do you want to store custom fields value in post meta (the normal WordPress way) or in a custom table. I’m quite confused since your first post is about custom table, but the 2nd one is not.?

    Just ignore what I thought might be the process and please tell me, step-by-step, how do I use MB to list/add/edit content into a custom table I set up in the database (not in post meta)? I am unable to find instructions on this.

    #13934

    Anh Tran
    Keymaster

    Hi Adam,

    I’ve created a video tutorial for you, please watch it and let me know if you have any difficulty.

    #13935

    Adam M
    Participant

    Thank you for taking the time to create this video. It is very useful.

    I had assumed that mapping the fields to the admin interface would be done similarly to how it’s done for custom post types. But this clarifies it.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.