Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Making User Blogs Part of the Main Theme

Gotcha. Before you had said you only wanted posts from the Administrator on the homepage… which would be you… so that’s where I was coming from.

The solution is almost the same however. If you’d like to do this without any plugins… just one little line of code… you could do this in the “loop” on your home.php file.

<?php query_posts('category_name=Featured'); ?>

[your wordpress loop here]

<?php wp_reset_query(); ?>

The loop by the way is simply a bit of code that iterates through all the posts for a particular page and displays them. So on the homepage… the loop shows ALL posts by default (up to whatever number you have configured in the dashboard… so the 5 most recent perhaps). If you click on a tag… then the “loop” shows all the posts with that tag. By setting up a custom query on the homepage… you are simply modifying the collection of posts that the loop will iterate through. So that little line of code simply limits the posts that the loop will iterate through as being posts from the category named “Featured”.

Skip to toolbar