Add the following PHP code to the end of your child themes functions file and modify to suit your own requirements.
add_action( 'init', 'multiple_custom_taxonomies' );
function multiple_custom_taxonomies() {
<pre><code>register_taxonomy( 'Planes', 'post',
array(
'label' => __( 'Planes' ),
) );
register_taxonomy( 'Trains', 'post',
array(
'label' => __( 'Trains' ),
) );
register_taxonomy( 'Automobiles', 'post',
array(
'label' => __( 'Automobiles' ),
) );
</code></pre>
}
The code enables you to create multiple custom taxonomies using 1 function and unlimited terms for each taxonomy.
Uses register_taxonomy
Leave a Reply
You must be logged in to post a comment.