Is it possible in the Blog section on the homepage to display only the articles I want? Through a category, for example.
Thank you.
Is it possible in the Blog section on the homepage to display only the articles I want? Through a category, for example.
Thank you.
Hello there,
I hope you are doing well today.
I am sorry for the inconvenience caused here but the theme does not allow you to choose the category to display on the homepage.
Best Regards,
Support
Hi,
You can try something like this in the functions.php in your child theme,
function my_home_category( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'cat', '11');
}
}
add_action( 'pre_get_posts', 'my_home_category' );
where 11 is the category ID you want for the blog page, here is how you want to find it: http://www.wpbeginner.com/beginners-guide/how-to-find-post-category-tag-comments-or-user-id-in-wordpress/
Let us know,
Thanks,
laranz.
Hi,
If you’re not familiar with child theme, then you can check the official doc here: Child Themes « WordPress Codex
Let us know,
Thanks,
laranz.