Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m getting a similar error when I try to access posts:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/ryebrew/wedrinkyourbeer.com/wp-content/themes/Swagger-Theme/swagger/inc/single-normal.php on line 144

    Although it’s not a functions.php problem, it seems similar to me since it started after I deleted some categories. The problem code is:

    $top_cat = split(':',$cat_tree);

    and it’s around

    <?php // get parent category
    						if(get_post_type() == 'post') {
    							$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;
    							$cat_link = get_category_link($parentObj->term_id);
    						} else {
    							$parent = "";
    							$cat_link="";

    Any help would be hugely appreciated.

    Thread Starter TeleportMASSIV

    (@teleportmassiv)

    Thanks for the response. I’m just getting my feet wet some I’m not sure how to check for the error with that code.

    The theme’s support team is suggesting that it’s a problem with my wordpress installation, so I’m setting up a test WP installation site with the theme installed on a blank database which seems like it will obviously work, I suppose to rule out some things.

Viewing 2 replies - 1 through 2 (of 2 total)