igaf
Forum Replies Created
-
OH. Sorry.
The Problem is solved: I will copy the solution here.I had to paste in the functions.php:
____________________________________
function my_em_posttype_cat_default($EM_Object){
global $post;
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’);
}
}
}
add_action(‘template_redirect’,’my_em_posttype_cat_default’, 1,1);
_______________________________________more here:
https://www.wpzoom.com/forum/viewtopic.php?f=87&t=11872Thanks!
Thanks. Now I have the error:
____________
You are here: Home ? Notice: Undefined offset: 0 in …..wordpress/wp-content/themes/tribune/functions/theme/functions.php on line 183 Catchable fatal error: Object of class WP_Error could not be converted to string in …../wordpress/wp-content/themes/tribune/functions/theme/functions.php on line 184
____________But it ist difficult the line 183 and 184 in the functions.php:
____________
/* Breadcrumbs
==================================== */……..
} elseif ( is_single() ) {
$cat = get_the_category(); $cat = $cat[0];
echo get_category_parents($cat, TRUE, ‘ ‘ . $delimiter . ‘ ‘);
echo $currentBefore;
the_title();
echo $currentAfter;
_____________hmmm…