• Is there a way to password protect a whole category? Or has someone come up with a hack to do this, or know how it could be done? Alternatively, a way to change the password on all protected posts in one go, without having to edit each post manually?
    I’m trying to use (misuse?) WP as a CMS for a site with news of different categories organised chronologically, and one category is “members only”. It’s OK for all members to use the same password.
    Perhaps I should be looking at another program? (preferably PHP/MySQL-based and open source) But I’d prefer WP as I already know it a bit.
    Any advice much appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Not a bad idea. Now this is kind of ghetto, and is really inelegant, and I’m not even sure if it’ll work, but I’ll suggest it anyway.
    Password protected directories work well for this kind of thing on a very basic level. You could always write the href’s by hand in your index.php, and have them all link as they normally would, except for the category you’d want to be hidden.
    That link would point to a page in a password protected directory, and that page would just have the php to display all the posts from the category.
    Like I said, you could probably modify things to make it work more elegantly, and have one less web-page to deal with, but this should be something you could set up in just a few minutes.

    Thread Starter eric

    (@eric)

    If I understand you, this means installing WP twice – once in the main index and once in the protected directory? The 2nd WP is really just for presenting stuff nicely in chronological order, plus I can divide the password protected category into subcategories later as the amount of content grows (my PHP is not yet good enough to roll my own script). Thought of doing that before but still looking for a way to do it all from one control panel, if poss. But thanks for the suggestion!

    Okay, I’m not quite sure what all the features that v2 and the new authentication scheme provide. But the site I’m converting does have a (smallish) member-only section that in the current version is protected by a user name/password scheme managed with .htaccess/.htpasswd files — and a good way to “password protect an entire category” (as was the question in this post) would be exactly the behavior the users are accustomed to.

    However, I’m wondering if since this question was originally asked, the available solutions have changed.

    Is there any advice on what path to take as I move that section, in particular, to WordPress? Specifically, is there a “show this category only if user level is subscriber” functionality already in the system somewhere? Should I wait for additional user-level plugins to be released? Or is there something else that I’m missing entirely. All suggestions are welcome.

    Thanks.

    After some time searching, I have found some leads:

    PostRestriction Plugin – https://soeren-weber.net/post/2006/01/01/121/#restrict; as of 2/14/06 is not WP 2.01 compatible. Would also be awkward to have to set the restriction on *every* post.

    PrivateCategories Plugin – https://gregelin.com/archives/?page_id=2 ; seems to make the entire category “private” but that means its only accessible to the author. I don’t see that it supports (or plans to support) per-user access.

    UserExtra – https://log.squish.net/2005/09/20/usermeta-userextra/ which extends user profiles to include admin-defined attributes, and provides for category access controls with user-level granularity. [Released for 2.0 on 2/5/06,
    https://log.squish.net/2006/02/05/userextra-goes-wp20/
    with a correction on 2/12. This may be very close to what I’m looking for, though there are a few quibbles listed in the discussion of the version for WP 1.x.]

    On the other hand, I haven’t found any reference that talks about restricting access to pages, and restricting access to uploaded files seems entirely outside the scope of this discussion (and I can’t see how WordPress could control that). So I may end up needing some combination of WordPress and .htaccess files after all.

    Apologies for rambling in public.

    ebuckley

    (@ebuckley)

    Have you looked at category access?

    https://www.coppit.org/code/

    Category Order 1.9.2 Allows the blog administrator to set an explicit ordering, spacing, and indentation of categories in the category list that appears in the sidebar. The administrator specifies the ordering in the new “Category Order” management page. There is also an option for placing the category post count inside the link. Versions after and including 1.9.0 have been tested on WordPress 2.0, but may work with earlier versions.

    moshu

    (@moshu)

    ebuckley,
    what you posted has nothing to do with the OP’s request… (wrong copy/paste)
    however, on the same page you linked above there is the plugin: Categeory Access which might be of help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Password protect a whole category’ is closed to new replies.