Skip to content

Instantly share code, notes, and snippets.

@hivepress
Created July 17, 2024 23:59
Show Gist options
  • Save hivepress/ec55e87227321fcf1b38fdceaa93d47c to your computer and use it in GitHub Desktop.
Save hivepress/ec55e87227321fcf1b38fdceaa93d47c to your computer and use it in GitHub Desktop.
Allow selecting multiple categories in the back-end listing form #hivepress #listings
<?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
);
@PhantomFreelance
Copy link

Amazing thank you. I'm not using paid listings so should be good, but I'll test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment