Forums

[resolved] Can you hide your blog but keep your pages public? (8 posts)

  1. m1ck3y
    Member
    Posted 6 months ago #

    I'm wondering if there is a way to hide the blog and individual posts from all non-logged in users but allow public access to all pages.

    Basically index.php and single.php need to be always private, but everything else public.

    Any ideas?

    Thanks!

  2. Arru
    Member
    Posted 6 months ago #

    Would marking all blog entries "private" do the trick?

  3. m1ck3y
    Member
    Posted 6 months ago #

    That could totally work. My worry is that I'm going to use this idea with a lot of contributors and I really need a way to have the posts be private without counting on them to mark new ones.

  4. Arru
    Member
    Posted 6 months ago #

    Ok, then it's about roles and capabilities?

    http://codex.wordpress.org/Roles_and_Capabilities

  5. m1ck3y
    Member
    Posted 6 months ago #

    Right, basically I want all logged in users to be able to access the blog and individual posts but not the general public. I want non logged in people to just see the pages, and only when you log in can you access the blog.

  6. Josh
    Member
    Posted 6 months ago #

    You can write a custom function to tell wordpress to only display the blog pages if the user is logged in.

    Something like this:

    <?php if ( is_user_logged_in() ) { ... } ?>

    It's gonna be a tough one.. but it's doable.

    Did you check the repository to see if there is already a plugin which does this?

  7. keesiemeijer
    moderator
    Posted 6 months ago #

  8. m1ck3y
    Member
    Posted 6 months ago #

    Thanks everyone, I think I got it squared away!

Reply

You must log in to post.

About this Topic