Created
April 24, 2024 10:31
-
-
Save bugnumber9/6ce9dcc1d8ee54d07815c161e07f85d4 to your computer and use it in GitHub Desktop.
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
| /** | |
| * Add taxonomy to pages | |
| */ | |
| function bnn_add_pages_tax() { | |
| register_taxonomy( | |
| 'page_category', | |
| 'page', | |
| array( | |
| 'label' => __( 'Categories' ), | |
| 'rewrite' => array( 'slug' => 'page-category' ), | |
| 'hierarchical' => true, | |
| 'show_admin_column' => true, | |
| ) | |
| ); | |
| } | |
| add_action( 'init', 'bnn_add_pages_tax' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment