The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Problem with get_term_link() - Returns "Catchable fatal error" (1 post)

  1. ryansigg
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic