• Resolved ChaoscripT

    (@chaoscript)


    Hi,
    I don’t know if the problem only in my WordPress website, but I tried this plugin, created an new database table, but the values stored also in postmeta table too.
    I thought maybe this plugin solve it and save it only at new database table.

    The problem is only at my website?

    Regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Abhishek

    (@abhisheksatre)

    Hi @chaoscript,

    To keep your WordPress site compatible with other plugins, by default this plugin saves ACF field data in the?wp_postmeta?table along with a custom table. You can disable this behavior using this filter.

    add_filter('acf_ct/settings/store_acf_values_in_post_meta', '__return_false');

    https://acf-custom-tables.abhisheksatre.com/docs/filters/store-acf-values-in-post-meta-table/

    Thread Starter ChaoscripT

    (@chaoscript)

    Hi,

    First, thanks for the comment, It is not obvious.

    Second, I want to understand, if I use the filter you mention, the ACF will save at new table right? but then functions like get_post etc will not works? because it’s not pull from the new table?

    Regards

    Plugin Author Abhishek

    (@abhisheksatre)

    if I use the filter you mention, the ACF will save at new table right?

    Yes, when you add the filter, ACF data will be stored only in the custom table.

    but then functions like get_post etc will not works? because it’s not pull from the new table?

    The get_post function retrieves WordPress post details. To fetch data from a custom table, you can use the following methods:

    1. Mysql query using WPDB
    2. get_field function
    3. Helper functions provided by the plugin such as get_custom_table_fields

    https://acf-custom-tables.abhisheksatre.com/docs/functions/

    Hoang Nam

    (@gnam389)

    Thanks for this great plugin, I think the Author should add a warning to write to 2 places postmeta and custom table, add a switch to turn this feature on or off in admincp.

    Thread Starter ChaoscripT

    (@chaoscript)

    But if you cancel the write in postmeta I think it will hurt other plugins that use ACF fields from postmeta table.

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