Bei mir sieht das ganze so aus:
<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="news">
<div class="content-full">
<h1>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<a href="<?php comments_link(); ?>" class="amount-comments"><?php comments_number('0', '1', '%'); ?></a>
</h1>
<div class="infos">
<span class="datum"><?php the_time('d.m.Y') ?></span>
<p class="postedby left">geschrieben von <?php the_author_posts_link(); ?> <?php listCats(); ?></p>
<div class="facebook-button">
<iframe src="//www.facebook.com/plugins/like.php&href=<?php echo urlencode(get_bloginfo('url')); ?>%2F%3Fp%3D<?php the_ID(); ?>&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
</div>
<div class="gplus-button">
<div class="g-plusone" data-href="<?php echo get_bloginfo('url'); ?>/?p=<?php the_ID(); ?>"></div>
</div>
<div class="tweet-button">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_bloginfo('url'); ?>/?p=<?php the_ID(); ?>" data-lang="de">Twittern</a>
</div>
<br class="clear" />
</div>
<?php the_content('weiterlesen'); ?>
<?php the_tags('<div class="tags">', ', ', '</div>'); ?>
<?php
$scores = the_related_get_scores(); // pass the post ID if outside of the loop
if($scores != NULL) {
$posts = array_slice( array_keys( $scores ), 0, 5 ); // keep only the the five best results
$args = array(
'post__in' => $posts,
'posts_per_page' => 5,
'caller_get_posts' => 1 // ignore sticky status
);
$my_query = new WP_Query( $args );
if ( $my_query->have_posts() ) { ?>
<h3 class="title">Verwandte Themen</h3>
<ul class="related">
<?php while ( $my_query->have_posts() ) {
echo '<li>';
$my_query->the_post();
echo '<a href="' . get_permalink( get_the_ID() ) . '">';
echo '<span class="title">'.get_the_title().'</span> ';
$content = get_the_excerpt();
echo substr($content, 0, 60).'[...]';
echo '</a>';
echo '</li>';
} ?>
</ul>
<?php }
else {
echo "No posts found...";
}
}
?>
</div>
</div>
<?php comments_template('', true); ?>
<?php endwhile; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="pagination">
<span>Seiten:</span>
<?php
global $wp_query;
$big = 999999999;
echo paginate_links( array(
'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages,
'prev_text' => 'Zurück',
'next_text' => 'Vor'
) );
?>
</div>
<?php endif; ?>
Alles anzeigen
Zum download gibts das Plugin hier: http://wordpress.org/extend/plugins/better-related/
Wäre echt super wenn du mir helfen könntest :)