Mobile app version of vmapp.org
Login or Join
Si4351233

: More than one permalink structures to apply each time depending on the post In my wordpress installation I use the following custom structure for Permalink Settings: www.example.com/%category%/%postname%/

@Si4351233

Posted in: #Permalinks #Wordpress

In my wordpress installation I use the following custom structure for Permalink Settings: 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: 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: example.com/mypost/ , the post responds just fine. When I continue browsing other posts, their permalink structure has been changed to: example.com/anypost/ , which is not intended.
When I change again my permalink structure to: example.com /%category%/%postname%/ , and call the post "mypost" on the browser with: example.com/mypost/ , I get a 404 message and when browsing my other posts, their permalink structure has returned to: example.com /%category%/%postname%/. When searching for “my post” by the name, the post appears with a permalink: 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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Holmes151

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. codex.wordpress.org/Post_Types

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme