Title: post permalink for custom post type
Last modified: January 18, 2025

---

# post permalink for custom post type

 *  Resolved [Kazi Mohammad Foysal](https://wordpress.org/support/users/kmfoysal06/)
 * (@kmfoysal06)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/post-permalink-for-custom-post-type/)
 * Hello everyone,
 * Today I was working on a WordPress theme and I had to create a custom post type
   and archive page for the post but to meet the requirement I had to make sure 
   that user of the theme have to able change permalink setting from wordpress permalink
   setting.but as I tried the whole day I cannot able to make sure to the custom
   post get the permalink of which user defined on wordpress permalink setting.I
   tried to add.rewrite rule to false and play around with different options also
   everytime flash the permalink.Even I switched to different version of wordpress
   and deactivating all plugin available.Now before I give up and start working 
   on settings API to register new settings to let user change permalink for my 
   custom post type I want to make sure that its not possible to use wordpress provided
   permalink setting to achieve the permalink customization.Is what I am thinking
   is right or its possible to achieve this functionality?
    -  This topic was modified 1 year, 4 months ago by [Kazi Mohammad Foysal](https://wordpress.org/support/users/kmfoysal06/).

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/post-permalink-for-custom-post-type/#post-18251765)
 * Permalink settings are only applied to the post post_type. CPT links are defined
   when the CPT is registered (the rewrite slug). It cannot include permalink tags
   such as %year%, %category%, etc. If you desire full end user permalink functionality
   like we have for posts, you’ll need to custom code your own implementation. Or
   maybe there’s a plugin that provides this functionality for you? IDK.
 * It is possible to alter CPT links via filter, so you could get the current post
   permalink setting from the options table (option_name “permalink_structure”) 
   and alter your CPT links accordingly. Or add a setting somewhere so the CPT permalink
   can be defined separately from the one for posts. You must always work in a base
   element unique to your CPT in any link so requests can be distinguished from 
   posts.
 * You’ll also need a custom rewrite rule so this CPT permalink can be correctly
   parsed by WP.
 *  Thread Starter [Kazi Mohammad Foysal](https://wordpress.org/support/users/kmfoysal06/)
 * (@kmfoysal06)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/post-permalink-for-custom-post-type/#post-18252009)
 * Thank you very much. I started implementing the idea and its working as requirement

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

The topic ‘post permalink for custom post type’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [Kazi Mohammad Foysal](https://wordpress.org/support/users/kmfoysal06/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/post-permalink-for-custom-post-type/#post-18252009)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
