开发者

How to change the way categories links are shown in wordpress?

开发者 https://www.devze.com 2023-02-05 18:04 出处:网络
my question is what should I edit in wordpress files so my categories links shows in any theme doesn\'t show l开发者_如何学JAVAike that www.mysite.com/category/category-1 , and make it show the way I

my question is what should I edit in wordpress files so my categories links shows in any theme doesn't show l开发者_如何学JAVAike that www.mysite.com/category/category-1 , and make it show the way I want it for example : category-1.mysite.com or even change the link to another website www.mysite2.com/ , I mean here just changing the links and not making category-1.mysite.com shows www.mysite.com/category/category-1 contents.


  1. as a subdomain: you could do it simply using a rule in your .htaccess file
  2. as another website: I don't really get the point here but you would need to make a custom plugin or simply some function in your function.php file that overrides the filter "category_link" provided by WordPress in order to return your custom link in function of the category ID passed in parameter. (see this WordPress codex page)

See also: this forum topic

0

精彩评论

暂无评论...
验证码 换一张
取 消