Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Hallo,

I have in my blog now add a Plugin [Custom Post Type UI] and have great a Post type movies and taxonomies like genre,actors,directer..... like this all ok now i have great a test post min add Movie and add info now come my big problem it show noting in post just a error

Catchable fatal error: Object of class WP_Error could not be converted to string in /home/user*/public_html/****/**/wp-content/themes/telegraph/functions/wpzoom-functions.php on line 783

Lines 780-786

} elseif ( is_single() ) {
  $cat = get_the_category(); 
  $cat = $cat[0];
  echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
  echo $currentBefore;
//      the_title();
  echo $currentAfter;

can some on help me by this problem.

PS: do i have to add any code to my theme wen i great a Post type or Taxonomies in [Custom Post Type UI]

share|improve this question

closed as too localized by toscho Jul 6 '12 at 19:56

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

$cat = $cat[0]->cat_ID;

of course if $cat is not empty

share|improve this answer

Essentially somewhere in that code one of function fails to do what it should and informs about that by returning object of WP_Error class.

You can use is_wp_error() to check for such returns and methods of WP_Error class to retrieve errors (and then echo them or something).

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.