"Using custom tables" in Custom Tables Documentation

Support MB Custom Table "Using custom tables" in Custom Tables Documentation

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #8869
    jpascalejpascale
    Participant

    Anh, in the Custom Table Documentation,
    under the heading "Using custom tables",
    it gives the instructions to add the 2 parameters ('storage type' and 'table') to the php code for $meta_boxes[].
    I understand that, if I were using the Online Generator to create the code for my metabox, that I would add the code in this documentation to the code created by the Online Generator and then paste all of it into the functions.php file.
    But since I'm using MB Builder, I don't know where to put this code. It doesn't look to me like MB Builder has added the code to functions.php file.
    My apologies if I'm missing something obvious. I'm still a newbie at this.
    James

    #8873
    Anh TranAnh Tran
    Keymaster

    Hi James,

    You can do that in the MB Builder extension with Custom Attributes. Just go to tab Settings and you'll see Custom Attributes button. Clicking on that and add "storage_type" and "table" attributes, then you're done!

    #8875
    jpascalejpascale
    Participant

    Anh, great! Thanks for the quick response!
    James

    #8876
    jpascalejpascale
    Participant

    Anh, if I go to Tab: Code Export, it says that 1 of the 2 reasons to use the code snippet: "Improve the performance since the meta box is loaded directly from your file. To use this, the easiest way is copy whole snippet to your theme functions.php."

    If I DON'T do this, where is the meta box stored & loaded from?

    #8877
    jpascalejpascale
    Participant

    Question #2: Wherever it is that you store the configuration code defining a metabox that is built using MB Builder, is it possible to use this metabox configuration as a starting point for use in MB Builder on a different site?

    #8893
    Anh TranAnh Tran
    Keymaster

    Hi,

    #1: If you don't use the exported code, then the whole meta box settings is saved in the database (under a special custom post type called "meta-box"). The MB Builder will get all the configured meta boxes and pass them to the Meta Box plugin (and extensions).

    Technically, meta box settings (an array) is stored as a serialized data in the post content of "meta-box" custom post type.

    #2: Yes, definitely. You can use the Export/Import features of the MB Builder to use it on other sites. Or you can just copy the exported code (in the Code Export tab) to use on other sites. Both methods work.

    #9044
    jpascalejpascale
    Participant

    Got it.
    Thanks.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘"Using custom tables" in Custom Tables Documentation’ is closed to new replies.