WordPress.org

Support

Support » How-To and Troubleshooting » Catchable fatal error: Object of class WP_Error could not be converted to string

Catchable fatal error: Object of class WP_Error could not be converted to string

  • Catchable fatal error: Object of class WP_Error could not be converted to string in /home/ravensne/public_html/wp-content/themes/continuum/single.php on line 120

    Please i really do need your help on correcting this error and am new to wordpress and css…

    this is d line of code, from line 117 to 123

    <?php // get parent category
    $category = get_the_category();
    $cat_tree = get_category_parents($category[0]->term_id, FALSE, ‘:’, TRUE);
    $top_cat = split(‘:’,$cat_tree);
    $parentObj = get_category_by_slug($top_cat[0]);
    $parent = $parentObj->name;
    ?>

    I would really appreciate your help.

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Catchable fatal error: Object of class WP_Error could not be converted to string’ is closed to new replies.