Jump to content
Sign in to follow this  
365dop

Featuring a category on the homepage

Recommended Posts

365dop

Is there a way to feature a category on the homepage rather than most recent posts? I want the homepage to be a curated version of the blog --- to showcase the stronger posts. 365 days of print

Share this post


Link to post
Share on other sites
cmunns

Yes. you can use the query_post function along with a hook to show only a certain category of posts. In your functions.php file in -Base add this: ` add_action('pagelines_before_theloop','myfunction'); function myfunction(){ if(is_home()) query_posts('cat=1'); } ` Where cat is the ID of your category you want featured. That's the basics

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×