how to rewite custom post type url
-
I am having trouble with custom post type url.
Well i have created custom post = new_quote
and i created a page-quote.php and fit a new loop to extract only data from this post type. And then go to pages > add new page > Inspiring Quote
and the url is :
mywebsite.com/inspiring-quotes/
and i set the ‘rewrite’ => array( ‘slug’ => ‘inspiring-quotes’ ), when i was registering custom post type.
But when i finished all and check… Its was not showing me the page-qoute.php it was showing the archive of the inspiring-quotes post type. so i change the link to “quotes” so then it started to show me the page-quote.php loop.
so is there anyone help me to fix this issue.
i want my website look like:
mywebsite.com/inspiring-quotes/
and when user click on any post the url should look like:
mywebsite.com/inspiring-quotes/view/[post-title]
please help me to understand how can i solve this issue.
- The topic ‘how to rewite custom post type url’ is closed to new replies.