Skip to content

Instantly share code, notes, and snippets.

@j-gardner
Created April 16, 2014 20:11
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 j-gardner/10928035 to your computer and use it in GitHub Desktop.
Save j-gardner/10928035 to your computer and use it in GitHub Desktop.
Add post tags support to a custom post type (in this case "portfolio")
<?php
/**
* Adds Post Tag support to a custom post type.
*
* This code is set to work with Arconix Portfolio, however
* the code should work with any of my plugins, simply
* change the 1st filter argument to match, i.e.
* 'arconix_testimonials_defaults' as I structure my
* defaults pretty much the same across all my plugins
*/
// Place the code below in your theme's functions.php file
function arconix_add_tag_support( $defaults ) {
$defaults['post_type']['args']['taxonomies'] = array( 'post_tag' );
return $defaults;
}
add_filter( 'arconix_portfolio_defaults', 'arconix_add_tag_support' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment