Home Forums Bug Reports Fixed settings Reply To: Fixed settings

  • Hi,

    Ah okay now I see. The location rules you set for a field group only applies to the admin interface. That’s how it works. ACF can’t control the displaying of the fields in your theme, that’s up to you. Just because the location rules change and a field is no longer shown that fields previously entered values are not deleted.

    So for example, for you to make sure the entered information only show’s on a post with term “articifialintelligence” you’ll need to check for that yourself in your theme. Example:

    $terms = wp_get_post_terms($post->ID, 'taxonomyslug', array('fields' => 'ids'));
    if( in_array( 'artificialintelligence', $terms ) ){
    	//this post is connected to the artificialintelligence term

    ACF is never intended to decide your frontend code for you nor will it delete your field information automatically (that could have catastrophic consequences for many scenarios). ACF main objectives are to (as interpreted by myself) :
    * Provide a great GUI for creating and handling custom meta values in WordPress
    * Provide a simple API for retrieving and/or updating those values

    ACF isn’t a platform tho 🙂 I don’t think it’s customary to let your clients themselves handle creating and changing field groups since it also requires code changes to the frontend theme for the changes to even appear. If they can do all that then there’s almost no need for you as a developer. However if you want to give your clients a descent amount of flexibility you could create all sorts of layouts with the flexible field and let them use that on pages etc. as kind of a modular content system.