Support

Account

Home Forums Backend Issues (wp-admin) Add Rule for new post/page

Helping

Add Rule for new post/page

  • Hi,

    Using my plugin, I am creating new post B from post A.

    My question is how I can copy post A rule to the post B at the time of creation and just change the post ID in new rule ?

    My question is for ACF PRO , ACF Free and adds-on.

  • Hi @sabbas

    The location rule is saved in the wp_postmeta table under the “rule” meta key for the free version, while for the PRO version it’s located in the wp_posts table under the “post_content” column. So you can modify it after you created the post B.

    Another option would be saving the rule in the wp_options table and then load the rule and the fields by using PHP code. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/register-fields-via-php/.

    I hope this helps 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Add Rule for new post/page’ is closed to new replies.