121 reputation
29
bio website
location United Kingdom
age 29
visits member for 3 years, 2 months
seen Aug 22 '12 at 12:13

Feb
3
awarded  Notable Question
Apr
23
awarded  Popular Question
Feb
13
awarded  Notable Question
Oct
2
awarded  Popular Question
Aug
4
comment Displaying the post count of all custom taxonomy terms in a list format
dmblog.ca/2011/09/wordpress-tag-cloud-with-post-counts
Jun
10
accepted Forcing WP to embedd a video when using a shortcode
Jun
10
asked Forcing WP to embedd a video when using a shortcode
May
31
accepted Limiting the number of posts in WP_Query leads to unexpected result
May
31
comment Limiting the number of posts in WP_Query leads to unexpected result
@mrwweb thank you, 'ignore_sticky_posts' => 1 solves the problem. One thing I don't understand though is that while posts_per_page returns the number of posts that I want, numberposts returns more than I want. So does numberposts automatically include the stickies?
May
31
revised Limiting the number of posts in WP_Query leads to unexpected result
added 198 characters in body
May
31
asked Limiting the number of posts in WP_Query leads to unexpected result
May
10
awarded  Tumbleweed
Feb
25
comment Get all categories and posts in those categories
The difference is the number of db queries. One big vs. many small... ;)
Feb
25
comment Get all categories and posts in those categories
No it doesn't, you just need to change the output slightly (i.e. end list for cat n, and start list for cat n+1) everytime a post has a category that is different from the previous post's category... A lot simpler than bombarding your poor database with 20+ queries per pageload... (to my humble opinion :)
Feb
24
revised Get all categories and posts in those categories
deleted 31 characters in body
Feb
24
revised Get all categories and posts in those categories
added 238 characters in body
Feb
24
comment Get all categories and posts in those categories
Same problem as Sagive's code
Feb
24
comment Get all categories and posts in those categories
Thx, but take the example of say 10 categories. In that case your code causes 11 SQL queries. I am looking for 1 SQL query. The best thing would probably be to get all posts, ordered by category, but I don't know how to do that (I didn't find order_by = cat in the codex) !?
Feb
24
awarded  Commentator
Feb
24
revised Get all categories and posts in those categories
added 2 characters in body