Pentru related posts recomand mai degraba un cod (introdus in single.php), nu un plugin:
Codul merge sigur. Ti-am subliniat sus in cod de unde poti schimba numarul de articole asemanatoare (acum sunt 5), iar acum cineva care se pricepe mai bine ca mine, il rog sa-ti arate si cum se pot alinia orizontal (acum sunt aliniate vertical) deoarece eu nu stiu programare foarte bine.Cod:<?php $backup = $post; $tags = wp_get_post_tags($post->ID); if ($tags) { $tag_ids = array(); foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id; $args=array( 'tag__in' => $tag_ids, 'post__not_in' => array($post->ID), 'showposts'=>5, // Number of related posts that will be shown. 'caller_get_posts'=>1 ); $my_query = new wp_query($args); if( $my_query->have_posts() ) { echo '<h3>Articole asemanatoare</h3><ul>'; while ($my_query->have_posts()) { $my_query->the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><img src="<?php echo get_post_meta($post->ID, 'Image',true) ?>" width="149" height="96" alt="<?php the_title_attribute(); ?>" /></a><?php the_title(); ?></li> <?php } echo '</ul>'; } } $post = $backup; wp_reset_query(); ?>



Răspunde cu citat