Dynamically populate a select field’s choices for Custom Post Types— ACF

Dynamically populate a select field’s choices for Custom Post Types— ACF

Posted on

Adding the dynamic select field choices in Advanced Custom Fields can be challenging, as ACF does not offer this feature by default. In this blog, we will discuss to do just that. Register a custom field with name ‘post_type_selection’ and field type ‘Select’ Now let’s write the PHP code as described above. Notice that, we

Read More

Saving the ACF JSON locally to your plugin or theme file | Save, Load and Sync Advanced Custom Fields JSON

Posted on

Saving the ACF JSON files locally allows you to have version control over your field settings! Let’s learn how to do that. Create an acf-json directory Create a directory called acf-json in your plugin. Save the JSON Add the following in your functions.php file Now when you hit save/update for each ACF Group , it is going

Read More