Ich geb mal ein paar Zeilen zum Problem mit den Categorys.
Das ist die Stelle an der sie im Theme verankert sind:
Das hier wäre dann die dazugehörige Funktion aus den Wordpress Installations Dateien:
function the_category($separator = '', $parents='', $post_id = false) {
echo get_the_category_list($separator, $parents, $post_id);
Und da diese Funktion auch wieder auf eine Funktion verweißt, hier noch diese:
[code]function get_the_category_list($separator = ‘’, $parents=’’, $post_id = false) {
global $wp_rewrite;
$categories = get_the_category($post_id);
if (empty($categories))
return apply_filters(‘the_category’, __(‘Uncategorized’), $separator, $parents);
$rel = ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"';
$thelist = '';
if ( '' == $separator ) {
$thelist .= '<ul class="post-categories">';
foreach ( $categories as $category ) {
$thelist .= "\n\t<li>";
switch ( strtolower($parents) ) {
case 'multiple':
if ($category->parent)
$thelist .= get_category_parents($category->parent, TRUE);
$thelist .= '<a href="' . get_category_link($category->term_id) . '" title="' . sprintf(__("View all posts in %s"), $category->name) . '" ' . $rel . '>' . $category->name.'</a></li>';
break;
case 'single':
$thelist .= '<a href="' . get_category_link($category->term_id) . '" title="' . sprintf(__("View all posts in %s"), $category->name) . '" ' . $rel . '>';
if ($category->parent)
$thelist .= get_category_parents($category->parent, FALSE);
$thelist .= $category->name.'</a></li>';
break;
case '':
default:
$thelist .= '<a href="' . get_category_link($category->term_id) . '" title="' . sprintf(__("View all posts in %s"), $category->name) . '" ' . $rel . '>' . $category->cat_name.'</a></li>';
}
}
$thelist .= '</ul>';
} else {
$i = 0;
foreach ( $categories as $category ) {
if ( 0 < $i )
$thelist .= $separator . ' ';
switch ( strtolower($parents) ) {
case 'multiple':
if ( $category->parent )
$thelist .= get_category_parents($category->parent, TRUE);
$thelist .= '<a href="' . get_category_link($category->term_id) . '" title="' . sprintf(__("View all posts in %s"), $category->name) . '" ' . $rel . '>' . $category->cat_name.'</a>';
break;
case 'single':
$thelist .= '<a href="' . get_category_link($category->term_id) . '" title="' . sprintf(__("View all posts in %s"), $category->name) . '" ' . $rel . '>';
if ( $category->parent )
$thelist .= get_category_parents($category->parent, FALSE);
$thelist .= "$category->cat_name</a>";
break;
case '':
default:
$thelist .= '<a href="' . get_category_link($category->term_id) . '" title="' . sprintf(__("View all posts in %s"), $category->name) . '" ' . $rel . '>' . $category->name.'</a>';
}
++$i;
}
}
return apply_filters('the_category', $thelist, $separator, $parents);
}[/code]
Bzw:
[code]
function get_the_category($id = false) {
global $post;
$id = (int) $id;
if ( !$id )
$id = (int) $post->ID;
$categories = get_object_term_cache($id, 'category');
if ( false === $categories )
$categories = wp_get_object_terms($id, 'category');
if ( !empty($categories) )
usort($categories, '_usort_terms_by_name');
else
$categories = array();
foreach(array_keys($categories) as $key) {
_make_cat_compat($categories[$key]);
}
return $categories;[/code]
Ich weiß nicht ob das jetzt weiterhilft aber mal abwarten… 