You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Daniel. Thanks for the report. Unfortunately, I don't have any availability at the moment to look in to this right now. If you want to make an attempt, I am open to a pull request.
@dpotuznik (and anyone else who comes across this issue) –
If you have a WP multisite and want to display some taxonomies as radio buttons, but don't want to go through every site in the network and manually configure the settings on their options pages, you can do something like this:
functionuse_radio_buttons_for_taxonomies( string$taxonomy ) : void {
if ( ! class_exists( 'WordPress_Radio_Taxonomy' ) ) {
return;
}
// Add the taxonomies you would like displayed as radio buttons here.$taxonomies_to_convert = [ 'project_status', 'employee_status' ];
$should_convert_this_taxonomy = in_array( $taxonomy, $taxonomies_to_convert, true );
if ( ! $should_convert_this_taxonomy ) {
return;
}
$rbft_instance = radio_buttons_for_taxonomies();
$rbft_instance->taxonomies[ $taxonomy ] = newWordPress_Radio_Taxonomy( $taxonomy );
}
add_action( 'registered_taxonomy', 'use_radio_buttons_for_taxonomies' );
With that code in place, you don't have to set anything on any of your sites' options pages. Radio buttons will be displayed for the taxonomies you specify in the $taxonomies_to_convert array across the whole network.
Hi,
thank's for your plugin is really nice,
but i need to change wordpress to a multisite installation,
and now the site1 work, but all the other doesn't save the modification.
if i deactivate your plugin i can update with the plugin activated don't.
thank for your help.
In the meantime a wish you a beautiful day.
Best Regards
Daniel
The text was updated successfully, but these errors were encountered: