How to display posts from a specific category in the Latest News section in Zelle

Important notice: This product is now in maintenance mode and is no longer being actively developed or supported. Updates and bug fixes will not be provided unless they relate to security concerns.

First of all, make sure that you create a child theme using this tutorial. Now copy /sections/latest_news.php and copy it to Child Theme. And yes, you do need to put it in the same folder structure.

Now find the following line in  latest_news.php file:

$zerif_latest_loop = new WP_Query( apply_filters( 'zerif_latest_news_parameters', array( 'post_type' => 'post', 'posts_per_page' => $zerif_total_posts, 'order' => 'DESC','ignore_sticky_posts' => true )) );

and replace it with:

$zerif_latest_loop = new WP_Query( apply_filters( 'zerif_latest_news_parameters', array( 'post_type' => 'post', 'posts_per_page' => $zerif_total_posts, 'order' => 'DESC','ignore_sticky_posts' => true, 'category_name' => 'staff' )) );

Now replace the “staff” in the above line with your category slug.

And that’s all, folks. :)

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us