WordPress.org

Forums

Removing a page tab (6 posts)

  1. dendaw
    Member
    Posted 6 years ago #

    Hi There

    I wonder if anyone can help please?

    I am new here and whilst I am beginning to get the hang of how to create the type of site I would like, I have had a 'practise' on a friends new site.

    She has only just started on it and it is a work in progress. However, whilst getting her content in place etc she asked me to see if I could work out how to create a static home page.

    I have followed instructions and have managed to achieve that - but with a problem.

    When creating a page that is to be static, it seems to take the page header (title) as the page name and then insert a tab in the top menu bar.

    She already has a home tab. If I call the page 'home' it creates another tab with that name. If I give it another title it creates a tab with that name alongside the home tab - but of course they both link to the same place.

    I need to know how to create that static home page without it putting a tab link with that name in the menu bar?

    Does that make sense?

    The site is http://www.feastonraw.com and the tab at the top I don't want is 'welcome to feast on raw' if you need to see what I mean.

    Thanks for any help in advance.

  2. f1f
    Member
    Posted 6 years ago #

    If you go into your header.php file you should see some code like this:

    <?php wp_list_pages('title_li=&depth=1&sort_column=menu_order'); ?>

    (It may not match that exactly depending on your theme)

    This should be what creates the list of pages at the top. You can tell it to exclude certain pages. For example your Diary seems to have page ID 98 therefore:

    <?php wp_list_pages('exclude=98&title_li=&depth=1&sort_column=menu_order'); ?>

    Should display the same list but without the Diary page. You can exclude multiple pages by deparating their ID numbers with commas, e.g.

    <?php wp_list_pages('exclude=98,99,100&title_li=&depth=1&sort_column=menu_order'); ?>

    Again, don't just copy and paste this text straight into your theme, best to save a copy of the file and then do some trial and error. Hope that works.

    More on wp_list_pages here:

    http://codex.wordpress.org/Template_Tags/wp_list_pages

  3. dendaw
    Member
    Posted 6 years ago #

    Gosh that was quick :-)

    Thanks very much, I'll have a go.

  4. dendaw
    Member
    Posted 6 years ago #

    Hello me again.

    I have just had a look but there doesn't seem to be an id number attached to the 'welcome to feast on raw' page for me to exclude it? Presumably because it has been made a static page?

    Any other advise greatly welcomed.

    Thanks again.

  5. yatrik
    Member
    Posted 6 years ago #

    You will be able to find it in list of the pages. Once you mouse over to edit the page, it will show you a link and you will see something like this:

    http://www.domain.com/wp/wp-admin/pages.php?actino=edit&post=NN

    That NN is the id.

    Hope that will help.

  6. dendaw
    Member
    Posted 6 years ago #

    Oh yes

    That's great and seems to have worked.

    Thanks to both of you.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.