I’ve seen that page before and tried what it said and it didn’t work. My whole site ended up having an error. But what that page says is to add that code to functions.php. Isn’t my problem in breadcrumb.php so something there has to be fixed right?
99.9% sure it’s to do with your theme, it assumes that every post type has a normal post category (and has at least one set) when that isn’t necessarily true (e.g. em events). my snippet just assigns a category automatically before the error occurs, ideally you’d fix your theme.
Huh? I’m confused. What exactly am I supposed to do? I’m fixing my theme how?
you can try this one.
1.)
Edit your theme breadcrumb.php
then find function simple_breadcrumb_case($der_post){
2.)
below that add this code global $post;
3.)
Find this snippet
$ID = $category[0]->cat_ID;
echo get_category_parents($ID, TRUE, $markup, FALSE );
And replace with this
if( $post->post_type == EM_POST_TYPE_EVENT || $post->post_type == EM_POST_TYPE_LOCATION ){
$categories = get_the_category();
if( count($categories) == 0 ){
//assign a category to this
wp_set_object_terms($post->ID, 'uncategorized','category');
}
}else{
$ID = $category[0]->cat_ID;
echo get_category_parents($ID, TRUE, $markup, FALSE );
}
I did that and now my whole site is down and has this error:
Parse error: syntax error, unexpected ‘&’ in /home/moma/public_html/melaniefionaworld.com/wp-content/themes/especial/libraries/breadcrumb.php on line 80
Is it possible to post your breadcrumb.php codes using pastebin?
Ok I put it on pastebin & here’s the link: http://pastebin.com/UeDqEjfs
The problem has been fixed. Thank you so much to everyone who tried to help me get it fixed.