Reply To: Front page posts from specific category

#5711
Ron
Keymaster

Add this on a child-theme’s functions.php
Replace the number 10 with your chosen category ID.

function frontier_home_category( $query ) {
    if ( $query->is_home() && $query->is_main_query() ) {
        $query->set( 'cat', '10' );
    }
}
add_action( 'pre_get_posts', 'frontier_home_category' );

Get the category ID by going to the category page ( Posts -> Categories ). Click on the category you want then on your browser’s address bar you can search for the number ( ex. tag_ID=90 )