Skip to content

Instantly share code, notes, and snippets.

@peterwilsoncc
Created July 6, 2022 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterwilsoncc/7e9035d2130ca9cd3a8410a59359dd9f to your computer and use it in GitHub Desktop.
Save peterwilsoncc/7e9035d2130ca9cd3a8410a59359dd9f to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin name: PWCC Testing Taxos
*/
// Custom post type for testing page ordering plugin.
// return;
add_action(
'init',
function() {
// Register my test taxonomy.
register_taxonomy(
'pwcc_test_taxonomy',
'post',
array(
'hierarchical' => false,
'labels' => array(
'name' => 'PWCC Test Taxo',
'singular_name' => 'PWCC Test Taxo',
),
'public' => true,
'default_term' => array(
'name' => 'PWCC Test Term',
'slug' => 'pwcc-test-term',
),
)
);
// Deregister my test taxonomy.
unregister_taxonomy( 'pwcc_test_taxonomy' );
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment