Support » Fixing WordPress » Problem with get_term_link() – Returns "Catchable fatal error"

  • 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”


    $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):

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