Forums

Hiding Pages / Posts from Certain menus only (5 posts)

  1. jfellowes
    Member
    Posted 3 years ago #

    I have used wordpress to set up a website which has a few sections.

    The primary section I want to be public, however there is a sub-section (information that is only available to registered users) that I want to password protect (and I have done so by putting a username and password on the sub-domain).

    I now want to hide the pages (and posts if possible) held in the sub-domain from the menus and navigation bars in the main section. This seems to be reasonably straightforward and can be done through a plugin- has anyone used one that they are happy with and has shown itself to be v stable?

    The thing that I cannot work out is: Can I now have the pages that I had hidden from the main section menu appearing in a menu ONLY in the sub-section?

    Thanks for your help in advance!

  2. flammobammo
    Member
    Posted 3 years ago #

    Try the Role Scoper plugin. I use it to protect pages and posts that only become both accessible and visible in the pages and posts lists once the user with specified group permissions has logged in.
    There are other plugins around which have similar functionality, but either aren't updated to function with the latest version of WordPress or have limited functionality.

  3. educationthemes
    Member
    Posted 3 years ago #

    You can hide pages through some arguments with wp_list_pages. Change that code in your template to something like this:

    <?php wp_list_pages('exclude=1,2,3'); ?>

    1 2 and 3 are the page ID's that you want to exlude.

  4. jfellowes
    Member
    Posted 3 years ago #

    Thank you for your help- those techniques will, it seems, allow me to hide some pages from the list.

    However, the thing that I want to do is have them appear in lists adjacent to the pages in the sub-section whilst hiding it from lists in the main pages.

  5. flammobammo
    Member
    Posted 3 years ago #

    Sorry I think I misunderstood your question. Do you mean like for example at this site:

    http://sant.theiet.org.au

    If so, that is theme dependent, so unless you're keen to get in to theme development then you may just like to hunt around for a new theme.

Topic Closed

This topic has been closed to new replies.

About this Topic