Custom Fields
Re-Envisioned
Support MB Custom Table Custom Table: Taxonomy field och Taxonomy Advanced field?

  • Creator
    Topic
  • #31550
    Resolved Bellul
    Participant

    Hi!

    I have created a custom post type and three custom taxonomies. I am no going to create a new field group.

    I have several text fields etc, but I am also thinking to use three multiple choice fields for the three custom taxonomies. Should I choose Taxonomy field och Taxonomy Advanced field? Does my choice have anything to do with my custom table?

    Where are these fields data saved, if I choose the first or the second type? Do any of these two fields save the data in the custom table? In your documenmtation you say about Taxonomy field that "This field does not save any value in the database"?? Where is it saved? About the Taxonomy Advanced field you say: "store terms’ IDs in the post meta and doesn’t set post terms". I don't understand these two explanations. Can you further explain this and especially how they relates to custom tables (is anything saved there?)?

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

    Hi,

    The field taxonomy sets the post terms, the value is saved to the table wp_terms in the database.
    The field taxonomy_advanced sets the post meta, the value is saved to the table wp_postmeta in the database.
    You can see more tables of WordPress here https://codex.wordpress.org/Database_Description

    So if you use the custom table to store field value, you should use the field taxonomy_advanced.

    #31569
    Bellul
    Participant

    Thanks!

    But if I use taxonomy_advanced, the data is still not saved in my custom table (but in wp_postmeta)?

    If I tick the option "Create table automatically" in "Edit Field Group", all fields will be TEXT. Can I then afterwards just use a database tool to change column types?

    #31593
    Long Nguyen
    Moderator

    Hi,

    If you use the field taxonomy_advanced, the field value is saved to the custom table as other fields. Please read more on the documentation https://docs.metabox.io/extensions/mb-custom-table/

    The data type TEXT can be used for most cases. If you want to change the data type later, you can access your database and change it or contact your hosting support to ask to change the data type. Please read more here https://www.w3schools.com/sql/sql_datatypes.asp

    #31595
    Bellul
    Participant

    Thanks for clarifications!!

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