2017 © Pedro Peláez
 

library wp-taxonomy-radio-group

A WordPress walker class and function for rendering a taxonomy radio group.

image

wpscholar/wp-taxonomy-radio-group

A WordPress walker class and function for rendering a taxonomy radio group.

  • Wednesday, December 20, 2017
  • by wpscholar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 291 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 32 % Grown

The README.md

WordPress Taxonomy Radio Group

A WordPress walker class and function for rendering a taxonomy radio group., (*1)

Getting Started

The anticipated use case for this is removing the normal hierarchical taxonomy metabox from the WordPress admin and replacing with a custom metabox with radio buttons (as opposed to the normal checkboxes)., (*2)

For example, here is how to replace the standard categories metabox on the post edit screen with our own custom one:, (*3)

<?php

add_action( 'admin_menu', function () {

    $taxonomy = get_taxonomy( 'category' );

    add_meta_box( "{$taxonomy->name}div", $taxonomy->label, function () use ( $taxonomy ) {
        echo wp_tax_radio_group( $taxonomy->name );
    }, 'post', 'side' );

} );

The Versions

20/12 2017

dev-master

9999999-dev

A WordPress walker class and function for rendering a taxonomy radio group.

  Sources   Download

GPL-2.0+

20/12 2017

1.1.0

1.1.0.0

A WordPress walker class and function for rendering a taxonomy radio group.

  Sources   Download

GPL-2.0+

27/11 2017

1.0

1.0.0.0

A WordPress walker class and function for rendering a taxonomy radio group.

  Sources   Download

GPL-2.0+