On Requests page, hide sort for Budget (both up and down)

Hello,

This posting responds to/complies with HP’s 5/5/22 email in response to our recent support question (emailed to HP) as follows:

Question: On Requests page, how to hide sort for Budget (both up and down)?

HP’s 5/5 email advises “It’s possible, but requires a custom code snippet. Please post a new topic on the forum and we’ll post it there Forums | HivePress Support

Thank you in advance.

Please try this PHP snippet

add_filter(
	'hivepress/v1/models/request/attributes',
	function( $attributes ) {
		if ( isset( $attributes['budget'] ) ) {
			$attributes['budget']['sortable'] = false;
		}

		return $attributes;
	},
	1000
);

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