Created
March 4, 2012 07:06
-
-
Save BronsonQuick/1971091 to your computer and use it in GitHub Desktop.
Add Categories to Pages in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* | |
* In some weird occasions Pages need to have Categories like Posts in WordPress. | |
*/ | |
add_action( 'init', 'sennza_add_page_cats' ); | |
function sennza_add_page_cats() | |
{ | |
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