hello everyone,
ich wish to have additional links in the sidebar (left): on every single page i will show some links to posts from this categorie. i believe this is for better user expirience and better linking for sites from single.php.
So i searched for this code, which works fine for me. copied from this page http://www.galuba.net/?p=1684
<?php
if (is_single()) {
global $post;
$categories = get_the_category();
foreach ($categories as $category) :?>
<div class='box box_small'>
<h3>Artikel aus dieser Kategorie</h3>
<ul>
<?php
$posts = get_posts('numberposts=5&category='. $category->term_id);
foreach($posts as $post) : ?>
<li><a>"><?php the_title(); ?></a></li>
<?php
endforeach;
?>
<li><strong><a>term_id);?>" title="Zeige alle Artikel der Kategorie <?php echo $category->name; ?>">Zeige alle Artikel der Kategorie <?php echo $category->name; ?></a></strong></li>
<?php
endforeach;
?>
</ul>
</div>
<?php
}
?>
The only problem, the whole sidebar moved to the bottom of the articles, before footer. the sidebar is no longer at the right site.
I copied the code bevor every other code, at row 1 in sidebar.php, because i wish to have this code, even when i use some widgets.
Any suggestions? Thank you for your support.














