I’m thinking there’s probably a simple question to this or I’m having a brain fart here or something…
So, I want to produce a link in one of my theme files to a certain term, “all” in a taxonomy, “jobs.” I can’t manually put in the link because I don’t know how the client is going to setup their permalink structure.
I found the get_term_link() function in /wp-includes/taxonomy.php and I’ve been trying to use it, as it seems pretty straight forward, but I just can’t get it to work.
I couldn’t find any documentation in the Wordpress Codex on the function, but looking in taxonomy.php it has the function setup like this:
get_term_link( $term, $taxonomy )
So, I assume I should be able to just do this in my theme file:
(Note: Ignore that ‘<’ and ‘>’ aren showing their HTML equivalent above - TF issue…)
But I get this error message:
Catchable fatal error: Object of class WP_Error could not be converted to string in /path-to-my-theme-file/file.php on line 38
Anyone know what I’m doing wrong?