• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Rewrite Permalink Structure To Include Taxonomy Term Slugs For Your Custom Post Type

This download folder includes the entire code for creating a CPT and registering 2 custom taxonomy terms.

In this case, the CPT is named property and the custom taxonomies are district-type and city-type.

The single permalink structure, as seen in the demo video, is :

/property/district/city/single-entry-title/

To customize this code to match your own custom post type and taxonomies, simply search find and replace the names using your code editor.

Here’s what the code generates in your WordPress Dashboard :

CPT Custom Taxonomy Terms

Demo Video #

Shows the CPT taxonomy term slugs for property district and city types added the custom permalink structure on the single entry listing.

Tested using both the AgentPress Pro & Genesis Sample child themes by StudioPress.

Code Installation – From Download Folder #

There’s only 1 step :

Copy & paste all the PHP code to the end of your child themes functions.php file then go to Settings > Permalinks and click Save Changes to flush your old rewrite rules and save the new ones.

Download Folder

Related Code Snippets

  • Add Taxonomy Term Slug To CPT Permalink

Custom Post Type Taxonomy Terms

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems