This download folder includes the code which enables you to dynamically include the taxonomy type term slug to your custom post type permalinks on for single entries.
Example : If your CPT is named HUB and you create a custom type named Blogging, your permalink will change from this :
To this :
Where hub is the name of your custom post type, blogging is your taxonomy term followed by your entry title slug.
The code included in this download :
- Creates a custom post type named Hub.
- Creates a custom taxonomy named hub-taxonomy-type which adds support for creating unlimited custom term types from your admin screen.
- Rewrites your single permalinks to include the custom term the single entry is assigned to.
Shows the term links for a CPT added to the single entry permalinks.
Tested using the Genesis Sample child theme by StudioPress however will work in any Genesis or WordPress theme.
There’s 2 steps :
- # Copy & paste the PHP code from the functions.php file ( excluding the opening PHP tag ) to the end of your child themes functions file.
- # Go to Settings > Permalinks in your WordPress Dashboard and Resave your permalinks.
You can then create custom taxonomy terms like these :
Leave a Reply
You must be logged in to post a comment.