Title: Different Permalink Structure for a Custom Posts
Last modified: September 1, 2016

---

# Different Permalink Structure for a Custom Posts

 *  [ayandebnath](https://wordpress.org/support/users/ayandebnath/)
 * (@ayandebnath)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-different-permalink-structure-for-a-custom-posts/)
 * Hello,
 * I have couple of different types of custom Posts: Events, Courses, News.
    Now
   my SEO Team is demanding for different _Permalink structures_ for different post
   types.
 * They want the default permalink will be like – /%postname%/
    But for Events they
   need to be like – /%postname%_POSTYEAR/ (because event name can be same but if
   they happens each year) But for Courses they need to be like – /%postname%_%post_id%/(
   course name can be same but provider name will be different) etc.
 * How to do it? with and without any plugin?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-different-permalink-structure-for-a-custom-posts/#post-7651061)
 * That’s not really a custom permastruct as WP uses the term, it’s really a custom
   post slug. What you would want to do is modify the default title slug that’s 
   composed after the title is entered. If the POSTYEAR is always the current year,
   that’s fairly simple to add. Adding the post ID is not so easy because the final
   assigned ID is not known until the post is actually published.
 * Forgetting the lack of ID data for the moment, ideally you would want to modify
   the slug when it’s created. This is accomplished with an AJAX request. I’m unsure
   of what code is called when a title slug is needed, but that information exists
   somewhere, though it may be hard to find. I’ll look deeper if you want to go 
   this route. Remember though that the post ID is not available this way.
 * Another possibility is to let the title slug be what it is for editing and alter
   it after the edit form is submitted. The ‘wp_insert_post_data’ filter can be 
   used for this, the title slug is keyed by ‘post_name’. You can get the post ID
   through this filter if it’s an update, but not for new posts.
 * For new posts I think the only way to incorporate the post ID in the title slug
   is to hook ‘wp_insert_post’ and re-save the post with the modified title slug.
 * I’m not aware of any plugin that would facilitate this, but I tend not to use
   many plugins, I custom code nearly everything.
 *  [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * (@sasiddiqui)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-different-permalink-structure-for-a-custom-posts/#post-7651062)
 * Hi Ayan Debnath,
 * Try this plugin for different Permalink structures for different post types.
 * [https://wordpress.org/plugins/permalinks-customizer/](https://wordpress.org/plugins/permalinks-customizer/)
 * Hope it helps you in achieving your goal. 🙂
 * Thanks,
    Sami
 *  Thread Starter [ayandebnath](https://wordpress.org/support/users/ayandebnath/)
 * (@ayandebnath)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-different-permalink-structure-for-a-custom-posts/#post-7651097)
 * Hi Sami Ahmed Siddiqui,
 * I am using this plugin – [https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/)
 *  [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * (@sasiddiqui)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-different-permalink-structure-for-a-custom-posts/#post-7651107)
 * It’s a great plugin Ayan Thousands of people are using it 🙂
 * So, Everything is working fine as your SEO Team wanted to be or still something
   remaining?
 * Regards,
    Sami

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Different Permalink Structure for a Custom Posts’ is closed to new replies.

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [permalink](https://wordpress.org/support/topic-tag/permalink/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 3 participants
 * Last reply from: [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/how-different-permalink-structure-for-a-custom-posts/#post-7651107)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
