Lucrez la o tema in acest moment si m-am gandit sa pun in dupa articolele normale si ce le mai comentate articole care le poate avea blogul/site-ul pe o platforma wordpress.Evident codul poate fi pus si in alta parte ca de exemplu inainte de afisarea articolelor normale.Eu l-am pus in partea de jos a temei si indica 6 articole.
Iata codul:
[codesyntax lang=”php”]
<?php
query_posts(array(
'orderby' => 'comments',
'showposts' => 3
));
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div class="content" style="min-height:200px;">
<h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
<span style="float:left;margin-right:10px;"><?php the_post_thumbnail(array( 130,130 )); ?></span>
<?php the_excerpt(); ?>
</div>
<?php endwhile;
endif; ?>
[/codesyntax]
Cateva mentiuni : codul showpost => indica cate articole sa apara,divul content trebuie stilizat in css.
Pute-ti modifica codul unde este orderby => ‘comments’ si sa scrieti ‘rand’ si o sa apara articole random..








