WordPress.org

Ready to get started?Download WordPress

Forums

Hide Categories If Not Logged In (6 posts)

  1. kaswistry
    Member
    Posted 5 years ago #

    I am using the latest WordPress platform.

    1)I just wanna ask if you know of any plugin that would hide the categories widget until a user is logged in?

    2)And also if it would be possible to set teh category widget to appear as a hierarchy that you could hide some of the categories you dont need while the ones you need are open, to save space? thanks

    Thank you

  2. MichaelH
    Member
    Posted 5 years ago #

    Not that easy to do with Widgets. If you don't use widgets then you could control that with coding in your sidebar.php.

    Might suggest you look at something like Category Access:
    Category Access allows you to limit, by user, what categories the person sees when editing posts. This applies to just Authors and Subscribers which makes sense. Can also control what categories are not displayed on the blog but within limits (will hide the_content and the_title, but not the_time,the_date, the_category) Can also restrict what categories guests (not logged in) see on blog.
    http://www.coppit.org/code/

    The only thing I don't know is if it restricts display of Categories in a widget.

  3. kaswistry
    Member
    Posted 5 years ago #

    Is there a way I could remove the sidebar widgets from the front page then? What is the best way to hide the categories from non-registered users?

    thanks

  4. kaswistry
    Member
    Posted 5 years ago #

    Also, I was thinking, If I cant really get a specific widget to handle categories, maybe I could get a widget that hides "some" widgets if the user is not logged in? Or a a script maybe?

    I was planning on a member's only page, with some info available for visitors that's why I was hoping to show them two different widgets

  5. MichaelH
    Member
    Posted 5 years ago #

    Is there a way I could remove the sidebar widgets from the front page then?

    In your sidebar.php you could test for is_home and bracket that around the sidebar code.

  6. dainismichel
    Member
    Posted 5 years ago #

    Interesting, I'm trying to only show a widget when users are not logged in and don't know how to accomplish that.

Topic Closed

This topic has been closed to new replies.

About this Topic