WordPress
4
Вклад в тег
<div id="parallelogram"></div>
body {
font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
padding: 100px;
font-size: 13px;
}
#parallelogram {
width: 300px;
height: 120px;
background: #343434;
-webkit-transform: skew(-10deg);
-moz-transform: skew(-10deg);
-o-transform: skew(-10deg);
transform: skew(-10deg);
}
<b><?php wp_list_authors('show_fullname=1&optioncount=1&orderby=post_count&order=DESC&number=5'); ?></b>
function top_authors($number = 10) {
$uc = array();
$blogusers = get_users();
if ($blogusers) {
echo '<ul>';
foreach ($blogusers as $bloguser) {
$post_count = count_user_posts($bloguser->ID);
$uc[$bloguser->ID] = $post_count;
}
arsort($uc);
$i = 0;
foreach ($uc as $key => $value) {
$i++;
if ($i <= $number) {
$user = get_userdata($key);
$author_posts_url = get_author_posts_url($key);
$post_count = $value;
if ($post_count > 0) {
echo '<li><a href="' . $author_posts_url .'">' . $user->display_name . '</a> (' . $post_count . ')</li>';
}
}
}
echo '</ul>';
}
}
<?php if (function_exists('top_authors')) top_authors(10); ?>