**# ***
Want to Change the Permalink Structure for Custom Post Types in WordPress?
A Brief Introduction to Custom Post Type Permalinks in WordPress
WordPress uses search engine optimized and user-friendly URLs called permalinks. While it’s possible to customize permalinks for regular blog posts, the same customization options do not apply to custom post types or taxonomies. In this guide, we will show you how to modify permalinks for your custom post types using a helpful plugin.
Customize Custom Post Type Permalinks with the Help of a Plugin
The Custom Post Type Permalinks plugin is an excellent free solution for WordPress users who want to change permalinks for different post types. To begin, you’ll need to install and activate the plugin. Not sure how to install a WordPress plugin? Don’t worry, our step-by-step guide can assist you with that.
Once you activate the plugin, navigate to the Permalinks section under Settings in your WordPress dashboard. Scroll down until you find the ‘Permalink Settings for Custom Post Types’ section. This is where you can personalize the permalink structure for specific items within your custom post type.
Modifying Permalink Structure for Custom Post Types
To edit the permalink structure, you can make use of standard WordPress permalink tags. If you need a comprehensive list of available tags, please refer to our article on creating a SEO-friendly URL structure in WordPress.
Let’s explore a few examples:
Example 1: Including Post ID in the Permalink
If you prefer to display the post ID rather than the post name in the URL, you can achieve that by adding the following tag: / %post_id% /
. Remember to include the trailing slashes (‘/’) at the beginning and end of the tag, as these separators are crucial for the permalinks to function correctly. Don’t forget to save your changes.
Example 2: Adding the Year to the Permalink
If you wish to include the year before the post name in the URL, use the following tags: / %year% /% post_name% /
. Save your changes to update the permalink structure.
Example 3: Custom Taxonomy in the Permalink
In case you have a custom taxonomy named ‘digital marketing’ and want to add the custom taxonomy term to the URL of your custom post type, incorporate the tags: / %digital_marketing% / %post_name% /
. Here, ‘digital marketing’ refers to the slug of the custom taxonomy.
Make sure to save your changes after modifying the permalinks.
In Conclusion
Thanks to the Custom Post Type Permalinks plugin, you have the ability to customize the permalink structure for your custom post types in WordPress. By optimizing your URLs for better search engine visibility and a more user-friendly experience, you can improve your website’s performance. For more valuable tutorials on custom post types in WordPress and expert recommendations on the best WordPress SEO plugins, feel free to explore our articles. Don’t forget to subscribe to our YouTube Channel and follow us on Twitter and Facebook for regular WordPress video tutorials.