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

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.