0

In my wordpress installation I use the following custom structure for Permalink Settings: www.example.com/%category%/%postname%/
Through Yoast’s WordPress SEO plugin, I have checked the option to “Strip the category base (usually /category/) from the category URL”.
Just for a specific post and for that post only, I wish to have a URL like: www.example.com/mypost/ (although “mypost” will be assigned to a category).
In my staging environment, when I change my permalink settings to “Post Name”, I get the wanted permalink structure for the particular post. When I call the post on the browser with: www.example.com/mypost/ , the post responds just fine. When I continue browsing other posts, their permalink structure has been changed to: www.example.com/anypost/ , which is not intended. When I change again my permalink structure to: www.example.com /%category%/%postname%/ , and call the post "mypost" on the browser with: www.example.com/mypost/ , I get a 404 message and when browsing my other posts, their permalink structure has returned to: www.example.com /%category%/%postname%/. When searching for “my post” by the name, the post appears with a permalink: www.example.com/uncategorized/mypost/.
The question is: is there any way to have more than one permalink structures and select each time the most suitable structure depending on the post?

0

You can not change the URL structure for a single post.It does not work that ways.However you can publish a page having the URL as per your requirements.Also another approach can be to create a Custom Post Type in WordPress and keep its slug as per your requirements. https://codex.wordpress.org/Post_Types

  • Thanks Webimetry Solutions. The shortcoming with the page option is that I cannot assign the page to a post category so to have it in the same cluster with the other related posts, the URL of which will involve their category. Are you aware of any method to publish a common post with the required URL structure, using admin panel facilities - without coding? – Michael May 25 '15 at 12:18
  • The only other option can be Creating a Custom Post Type and calling all the Post Types while calling for related posts. – Webimetry Solutions May 25 '15 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.