Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Making User Blogs Part of the Main Theme


David Lewis
Participant

@takeo

Contributors, Authors, Editors and Administrators can all write blog posts.

https://codex.wordpress.org/Roles_and_Capabilities

The tricky part is only allowing admin-authored posts in the homepage loop. Not sure how to do that. Perhaps with a conditional or a custom query? I’m not enough of a coder to answer that. Goggle is your friend :) If there will be only ONE admin however (you?) then it could be as simple as this (note: change “1” to whatever your author id is).

<?php query_posts('author=1'); if (have_posts()): while (have_posts()): the_post(); ?>

yay. my posts.

<?php endwhile; else: ?>

oops. no posts.

<?php endif; wp_reset_query(); ?>

You can use the same idea to display only posts from a certain category (i.e…. featured)… but I’m pretty certain you can’t restrict what categories a person can post in based on user level. So that probably wouldn’t help you.

Skip to toolbar