Wordpress : Custom Url Tag
I have a question.
I want use the system of tag without the word tag
.
Example : http://xxxxxxxxx.com/tag/Matt
(will display all posts with tag Matt)
I want the same with http://xxxxxxxxx.com/**people**/Matt
(will display too all posts with tag Matt)
Help, p开发者_JAVA技巧lease.
Thanks in advance.
I think the answer is :
Custom Taxonomies
If you want for 2 different URLs to resolve to the same page, then you can add the following your .htaccess rules:
RewriteRule ^people/(.*)$ tag/$1 [L,NC]
With this, you can then view:
http://domain.com/tag/matt
http://domain.com/people/matt
which will display the same page. Problems are content duplication and when you visit /people/new-york
, it will show all posts tagged new-york even though it is not a person.
My suggestion then is to use this rule instead:
RewriteRule ^people/(.*)$ tag/people:$1 [L,NC]
Which makes your URLs resolve to something like: http://domain.com/tag/people:matt, which means, you can just tag posts as people:matt
, and/or people:arvin
, thus adding metadata to the tags.
精彩评论