)

Show a specific category on homepage

Last Updated: 2 years ago by BrodNeil

if (is_home()) {

query_posts(“cat=3”);

}

 

here’s another hack to show what category you want on homepage

<?php if (have_posts()) :query_posts($query_string .'&cat=3'); while (have_posts()) : the_post(); ?>

And if you want to exclude a specific category from homepage, instead of '&cat=3', put'&cat=-3' .

via WordPress › Support » Show a specific category on homepage.

I am passionate about what I do.

While I spend over 48 hours a week on SEO and digital marketing, it's not accurate to say that I live and breathe them..

This is what I believe: "And whatsoever you do, do it heartily, for YHWH, and not for men." (Colossians 23:3)

Recommendations

Discover more tools - See our recommended tools, software, and services.