This function will show the last 3 posts from any category on front page:
// Only top 3 posts from CHR category
add_action('pre_get_posts', 'ad_filter_categories');
function ad_filter_categories($query) {
if ($query->is_main_query() && is_home()) {
$query->set('category_name','chatham-house-rules');
$query->set('showposts', 3);
}
I want to do this twice more with two other categories but it will only ever work with one. It also defaults to the posts_per_page setting in the Admin panel. Any ideas how I can achieve 3 latest posts from 3 categories in specific order on front page?