• I want to hide a page from appearing on the home page menu under the “Pages” title of my Web site https://www.smartphonecorner.com. Right now, I left the title of the page blank, so it is not appearing in the menu, however this method leaves a line break and empty space between the header and the listing of the pages.

    I am looking for a more elegant way to not display a page, while also not leaving any spaces between the menu title and the listings.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Since you are using the WordPress Default 1.6 Theme, you should be able to edit wp-content/themes/sidebar.php and use the exclude= parameter with template tag, wp_list_pages().

    Thread Starter nitin_gupta

    (@nitin_gupta)

    I tried it but it did not work.

    I replaced the line

    <?php wp_list_pages(title_li=<h2>Pages</h2>’ ); ?>

    with

    <?php wp_list_pages(‘exclude=230&title_li=<h2>Pages</h2>’ ); ?>

    and nothing happened. I could still see the space.

    Then i tried

    <?php wp_list_pages(‘exclude=230’ ); ?>

    Again the same result, nothing happened and i could still the space between the title and listing of pages.

    Then you might be using Page Widget and you can use the Exclude setting.

    See:
    Widgets_SubPanel

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide a page from appearing in the home page menu’ is closed to new replies.