Skip to content

Instantly share code, notes, and snippets.

@cameronjonesweb
Created July 20, 2019 16:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cameronjonesweb/7563a4557fb566f6ba0c17c2516651b4 to your computer and use it in GitHub Desktop.
Save cameronjonesweb/7563a4557fb566f6ba0c17c2516651b4 to your computer and use it in GitHub Desktop.
Converts the category checkboxes to radio buttons
<?php
function cameronjonesweb_radio_taxonomy_meta_box( $post, $box ) {
ob_start();
post_categories_meta_box( $post, $box );
$meta_box = ob_get_clean();
echo str_replace( 'checkbox', 'radio', $meta_box );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment