WordPress.org

Ready to get started?Download WordPress

Forums

Private: Homepage (2 posts)

  1. jaxshores
    Member
    Posted 5 years ago #

    Hi everyone,

    I have set the posts page to be a page other than "home". The homepage is set to be page I am calling "homepage".

    Now I am able to set this page as private so that the link does not display in the navigation, but unfortunately the title of the page says "Private: Homepage".

    Is there a way I can have the homepage title not have the heading "Private" while keeping the page link from displaying in the navigation? There is automatically a "home" link, and a second link to this page is redundant. Here is a link to my client's blog:

    http://olivares4santarosa.com/wordpress/

    Thanks as always,

    Jack

  2. educationthemes
    Member
    Posted 5 years ago #

    You can stop pages from appearing in the navbar at the top by using the exclude parameter of wp_list_pages().

    I don't know your theme but probably in your header.php you will have a chunk of code like below or similar:

    <?php wp_list_pages(title_li=); ?>

    Add the exlude function and the papge ID that you want excluding i.e. your homepage:

    <?php wp_list_pages(title_li=&exclude=2); ?>

    where 2 is the ID of your homepage. Then you can set your homepage to public again.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.