• I’ve tried searching for this, but didn’t see anything relevant to me…

    Full error when trying to echo get_term_link() w/in a home page template:
    “Catchable fatal error: Object of class WP_Error could not be converted to string”

    Usage:

    $term = get_term_by( 'id', $cat_id, $tax);
    echo get_term_link( $term->slug, $term->taxonomy );

    The term object is returning just fine; if I echo $term->slug or $term->taxonomy they return the correct value… The issue seems to be within get_term_link() itself…

    Don’t see anything in the codex entry that helps (the term exists, obviously):
    https://codex.www.ads-software.com/Function_Reference/get_term_link

  • The topic ‘Problem with get_term_link() – Returns "Catchable fatal error"’ is closed to new replies.