- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi,
I have searched the web for a couple of days but can’t find a appropriate answer.
I use a Worpdress link structure like this: %category%/%postname% which results in /category/postname
But if I have posts in subcategories the Link is like /category/subcategory/postname
How can I define that the subcategory will NOT appear in the permalink?
As I mentioned before, I can’t find any advice to this on the web so I ask you for help.
Select Parent and Child both categories while adding a new post. This will strip child category in permalink.
For** subcategory will NOT appear in the permalink** — two ways
Plugin
for getting rid of nested subcategory i think you have to install plugin which can easily make you change url of page, post etc. This one came up first on Google: http://wordpress.org/plugins/custom-permalinks/
.htacess
You can rewrite you .htaccess if you are familiar with this.
Add the below line and try it:
RewriteRule ^category/(.+)$ http://www.site.com/$1 [R=301,L]
For** subcategory will NOT appear in the permalink** — two ways
Plugin
for getting rid of nested subcategory i think you have to install plugin which can easily make you change url of page, post etc. This one came up first on Google: http://wordpress.org/plugins/custom-permalinks/
.htacess
You can rewrite you .htaccess if you are familiar with this.
Add the below line and try it:
RewriteRule ^category/(.+)$ http://www.site.com/$1 [R=301,L]