Category Field Not Changing Order

Is there a trick to moving the “category” field on the listing from? I’ve had no problems moving around other fields, but no matter what order number I set the category field to, it doesn’t budge.

I’m using the PHP snippet to update the order (and with the same snippet, have moved everything else I need moved). I have cleared the cache, and am using the field name “categories”. I also have it set in relation to other fields with specified orders.

What could be preventing this from moving?

add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
        $form['fields']['categories']['_order'] = 1;
		$form['fields']['title']['_order'] = 2;
        return $form;
	},
	1000
);

Hi,

Please use this PHP snippet:

add_filter(
	'hivepress/v1/forms/listing_submit',
	function( $form ) {
		$form['fields']['categories']['_order'] = 123;

		return $form;
	},
	1000
);
1 Like

Perfect, thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.