Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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
You can’t perform that action at this time.