How To Get Custom Taxonomy Term Link In WordPress Archive Pages

Coding my most recent plugin took me an extra day. I was completely lost in getting custom taxonomy term link in the archive pages. I searched for hours, but a perfect answer was nowhere to be found.

I don’t want you guys to waste your time on finding this answer on forums, so here’s how you can get custom taxonomy term link in WordPress archive pages.

First, add following snippet to your current theme’s functions.php file or your plugin:

Now, you can get the term URL on your archive page using the following code:

Hope it’s working for you!

Leave a Reply