Web sayfamda bir makalemi açtığımda; girmiş olduğum makale bittikten sonra altında popüler olan diğer makalelelerin sıralanmasını istiyorum.
Aşağıdaki iki kod ile popüler olanları veya makaleleri çekebildim ancak sadece isimleri görünüyor.Ben eklediğim ön resmin ve içeriğinde sıralanmasını istiyorum.Yani sonsuz döngü misali al alta makaleler sıralansın.
<h3>Popüler Yazılar</h3> <?php $popularpost = new WP_Query( array( posts_per_page => 12, meta_key => views, orderby => meta_value_num, order => DESC ) ); while ( $popularpost->have_posts() ) : $popularpost->the_post(); ?> // Kendinize özgü düzenlemek için buradan başlayın. <li><a href=<?php the_permalink(); ?> title=<?php the_title(); ?>><?php the_title(); ?>(<?php if(function_exists(the_views)) { the_views(); } ?>)</a></li>
// Kendinize özgü düzenlemek için burada bitirin.
<?php endwhile; ?>Buda Diğeri ;
<?php
// The Query
query_posts( array ( 'category_name' => 'diy-ideas', 'posts_per_page' => 15 ) );
// The Loop
while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</li>
<?php endwhile;
// Reset Query
wp_reset_query();
?>İyi forumlar dilerim.