Pages
Home
Work with Us
Jul 10, 2011
Get how many posts are returned by a custom loop
To get the output, just paste the following snippet anywhere in your themes file.
[php]
$feat_loop = new WP_Query( 'showposts=12&category_name=featured' );
echo "Query returned ".$feat_loop->post_count." posts.";
[/php]
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment