It is possible to save a taxonomy field as a normal field

Support General It is possible to save a taxonomy field as a normal fieldResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18944
    Infolu OfficialInfolu Official
    Participant

    It is possible to save the id of a select advanced taxonomy field as if it were a normal data (Type save only the id of the selected taxonomy without consuming space in the table wp_term_relationships) save as if it were a postmeta

    #18960
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The field Taxonomy Advanced only saves the value in the post meta (table wp_postmeta).

    The field Taxonomy does not store value in the post meta, it sets posts term like category and tag (table wp_term_relationships). The purpose of this field is to replace the default WordPress meta box for taxonomy and offer more options to control how it displays.

    For more information, please follow this documentation
    https://docs.metabox.io/fields/taxonomy-advanced/
    https://docs.metabox.io/fields/taxonomy/

    #18963
    Infolu OfficialInfolu Official
    Participant

    Hi Long I must be missing something or the custom table metabox has a bug, because even when using taxonomy advanced it does not save in the custom table but as wp_postmeta even if the key is defined in MB_Custom_Table_API

    add_action( 'init', 'prefix_create_table' );
    function prefix_create_table() {
        if ( ! class_exists( 'MB_Custom_Table_API' ) ) {
            return;
        }
        MB_Custom_Table_API::create( 'my_custom_table', array(
            'place_mf_id_type' => 'TEXT NOT NULL',
            'intrometido'   => 'TEXT NOT NULL',
            'place_mf_id_company_activity_number'   => 'TEXT NOT NULL',
            'email'   => 'VARCHAR(20) NOT NULL',
            'place_mf_id_type_information_address_folder_geolocation'   => 'TEXT NOT NULL',
        ) );
    }
    

    Chave place_mf_id_type_information_address_folder_geolocation

    https://imgur.com/Je4F9nX" alt="null"

    #18979
    Long NguyenLong Nguyen
    Moderator

    Hi,

    If you use the MB Builder, please go to the Settings tab and type the name of the custom table to the box Save data in a custom table, see my screenshot

    or add the property 'table' => 'my_custom_table' if you use the code. Remember the field_id must be the same with column name.

    For more information, please follow this documentation
    https://docs.metabox.io/extensions/mb-custom-table/#using-custom-tables

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