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/winentra/public_html/s1.ssonline.co.in/wp-content/themes/peekaboo/admin/common-functions.php on line 186

Line No. 186

Read More
echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');

Any ideas on this please?

Related posts

Leave a Reply

3 comments

  1. elseif ( is_single() && !is_attachment() && get_post_meta($post->ID, 'cust_cat', true) ) {
          $cat = get_post_meta($post->ID, 'cust_cat', true);
          echo $cat;
          echo $currentBefore;
          the_title();
          echo $currentAfter;
    
        } 
    
        elseif ( is_single() && !is_attachment() && !get_post_meta($post->ID, 'cust_cat', true) ) {
          $cat = get_the_category(); $cat = $cat[0];
          echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
          echo $currentBefore;
          the_title();
          echo $currentAfter;
    
        }