Created
July 17, 2024 23:59
-
-
Save hivepress/ec55e87227321fcf1b38fdceaa93d47c to your computer and use it in GitHub Desktop.
Allow selecting multiple categories in the back-end listing form #hivepress #listings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'hivepress/v1/meta_boxes/listing_attributes', | |
function( $meta_box ) { | |
if ( isset( $meta_box['fields']['categories'] ) ) { | |
$meta_box['fields']['categories']['multiple'] = true; | |
unset( $meta_box['fields']['categories']['attributes']['data-multistep'] ); | |
} | |
return $meta_box; | |
}, | |
1000 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amazing thank you. I'm not using paid listings so should be good, but I'll test it out.