Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save codehooligans/7b9baef5d9e467c47ad2 to your computer and use it in GitHub Desktop.
Save codehooligans/7b9baef5d9e467c47ad2 to your computer and use it in GitHub Desktop.
Codehooligans.com: Register Taxonomy for Product Packages Version 2
<?php
add_action( 'init', 'product_init' );
function product_init()
{
global $wpdb;
register_taxonomy( 'product_packages', 'products',
array( 'hierarchical' => true,
'label' => __('Product Packages'),
'query_var' => false
)
);
$wpdb->product_packagesmeta = $wpdb->prefix."product_packagesmeta";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment