所以,我用这个来获取URL:
<a href="/category/<?php foreach((get_the_category()) as $category) { echo $category->cat_name . \' \'; } ?>">
正在输出:http://example.com/category/whatever%20category/
而不是:http://example.com/category/whatever-category/
我怎样才能做到后者?非常感谢。