(URL per PM)
Irgendwie wird die Kategorievariable nicht bzw. falsch gesetzt. Und ich weiß auch warum. Hier:
PHP
<?php
foreach((get_the_category()) as $category) {
echo $category->cat_name . ' ';
$categoryvariable = $category->term_[COLOR="Red"][B]ID[/B][/COLOR];
}
?>
Das muss "term_[COLOR="#ff0000"]id[/COLOR]" heißen. Da hab ich mich verlesen. Steht ja auch korrekt im Codex...
Zitat von Codexcat_ID
the category id (also stored as 'term_[COLOR="#ff0000"]id[/COLOR]')
Änder das mal, dann müsste es gehen.
Wegen den Unterkategorien. Da ists wohl dasselbe...
PHP
<?php [COLOR="#ff0000"]$childcats[/COLOR] = wp_list_categories('title_li=&child_of=' . $categoryvariable . '&echo=0'); ?>
<?php if ([COLOR="Blue"]$children[/COLOR]) : ?>
<ul><?php echo [COLOR="#0000ff"]$children[/COLOR]; ?></ul>
<?php endif; ?>
Sorry, ebenfalls mein Fehler... :oops: