Skip to content

Instantly share code, notes, and snippets.

@nielslange
Last active February 18, 2017 14:22
Show Gist options
  • Save nielslange/28aeb3478d2b1bf0bbfa86f4d5b8d1c3 to your computer and use it in GitHub Desktop.
Save nielslange/28aeb3478d2b1bf0bbfa86f4d5b8d1c3 to your computer and use it in GitHub Desktop.
Add taxonomies to post type page
<?php
//* Add taxomonies to page
add_action( 'init', 'nl_add_taxonomies_to_pages' );
function nl_add_taxonomies_to_pages() {
register_taxonomy_for_object_type( 'post_tag', 'page' );
register_taxonomy_for_object_type( 'category', 'page' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment