Skip to content

Instantly share code, notes, and snippets.

@onjee
Created March 21, 2015 13:25
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save onjee/2ab8ea2f38830701322c to your computer and use it in GitHub Desktop.
#popular-comments { list-style:none; width:360px; } /*Ширина блока*/
#popular-comments li { overflow:auto; margin:10px 0px; border-bottom:1px solid #E6E6E6; padding-bottom:5px; } /*Стиль для списка записей*/
#popular-comments li img { float:left; margin-right:10px; border:4px solid #EEEEEE;} /*Стиль миниатюр*/
#popular-commentss li a { text-decoration:none; font-weight:bold; color:#1e292b;} /*Стиль активной ссылки*/
#popular-comments li p { margin-top:10px; }
<ul id="popular-comments">
<?php
$pc = new WP_Query('orderby=comment_count&posts_per_page=10'); ?>
<?php while ($pc->have_posts()) : $pc->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(array(10,10)); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<p>Posted by <strong><?php the_author() ?></strong> on the
<?php the_time('F jS, Y') ?> with
<?php comments_popup_link('No Comments;', '1 Comment', '% Comments'); ?></p>
</li>
<?php endwhile; ?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment