select HOUR(added), count(*) as nbr
from visits
where added between '2009-07-14' and '2009-07-15'
group by HOUR(added)
order by HOUR(added)
Monthly Archives: June 2013
Author list by post count
$abpArgs = array(
'orderby' => 'post_count',
'order' => 'ASC',
'order' => '25',
);
$authorsList = get_users($abpArgs);
echo '<ul>';
foreach ($authorsList as $author) {
echo '<li>' . $author->display_name; . '</li>';
}
echo '</ul>';
Get page content shortcode
function sgspcontent($atts) {
$sgsppostid = intval($atts[postid]);
$output = '';
query_posts("p=$sgsppostid");
if (have_posts()) : while (have_posts()) : the_post();
$output .= get_the_content($post->ID);
endwhile; else:
// failed, output nothing
endif;
wp_reset_query();
return $output;
}
add_shortcode("includepost", "sgspcontent");