I would like to get this:
mysite.com/category/tag/
example:
mysite.com/news/sports/
News is a CATEGORY and sports is a TAG
How can I do it?
Thanks.
|
I would like to get this:
example:
News is a CATEGORY and sports is a TAG How can I do it? Thanks. |
|||||
|
|
WordPress is practically setup to support this out of the box. You can go to In your theme's functions.php file, add:
Now be sure to reload your rewrite rules by going to Settings -> Permalinks and clicking "Save Changes" (you don't have to actually change anything) and you're done! CaveatsThis is going to add some "wildcard" rewrite rules which can easily interfere with others, depending on your site's content, permalink structure, etc. For instance, let's say your permalink structure is "Day and name", which adds rules for year/month archive pages like /2013/02/. These links will no longer work because WordPress is expecting to find a category of "2013" and a tag of "02". This is why WordPress typically prefixes elements, like /category/news/. Depending on your needs, these conflicts may be a dealbreaker or may be moot, that's up to you and your project. If you want to add a static prefix (or suffix), you could change |
|||||||||||
|