I’m searching for half an hour now on how to get the url/permalink base in WordPress (the ‘category’ and ‘tag’ value set in the backend). Could you please point me in the right direction?
I want to dynamically print the following – but only replace the tags
and category
part (not the tag/category itself):
<a href="/tags/my-tag">My Tag</a>
<a href="/category/my-category">My Category</a>
You really shouldn’t need this, as you should be outputting the URLs via the API:
get_tag_link
,get_category_link
,get_term_link
.However, for the sake of answering the question, they’re stored in options: