Support

Account

Home Forums General Issues Location Array not updating after PHP Import Reply To: Location Array not updating after PHP Import

  • Hi @lesgrossman

    Your location rules are written like this.

    Show the field group if:
    * post_type == finials
    * AND post_type == holdbacks

    The issue is that this will never return true. A post can only be of 1 type, not 2 or 3.

    To change the AND to OR, your grouping needs to change to this:

    
    'location' => array (
    			array (
    				array (
    					'param' => 'post_type',
    					'operator' => '==',
    					'value' => 'finials',
    					'order_no' => 0,
    					'group_no' => 0,
    				),
    			),
    			array (
    				array (
    					'param' => 'post_type',
    					'operator' => '==',
    					'value' => 'holdbacks',
    					'order_no' => 1,
    					'group_no' => 0,
    				),
    			),
    			array (
    				array (
    					'param' => 'post_type',
    					'operator' => '==',
    					'value' => 'endcaps',
    					'order_no' => 2,
    					'group_no' => 0,
    				),
    			),
    		),
    

    If you had created a new field group and added the rules correctly (into OR groups), this is how the code should have exported