I have this URL (www.yourdomain.com/view-promotion/123) which will use the Page Template to display my Custom Post Type content.
(123 is the CPT post id)
However, if I change the URL from the above to (www.yourdomain.com/view-promotion/christmas-promotion).
The url will automatically switched to (www.yourdomain.com/promotion/christmas-promotion) using the Custom Post Type Template
Additional Info
- view-promotion is the page name
- promotion is the post_type
- christmas-promotion is the post name
What should I do so that I could change the URL to (www.yourdomain.com/view-promotion/christmas-promotion) which will using the layout from the Page Template??
It is possible but this is a long struggle. You can install plugin for this easly. Your need this plugin: Custom Post Type Permalinks
Install this plugin and change permalink setting in settings > permalinks.