• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • About
  • Projects
    • GStaticMap WP Plugin
  • Contact
  • Privacy Policy

Lorenz Blog

All About Web & Mobile Application Development

  • Featured Articles
  • Gadgets
    • Android
    • Blackberry
  • Programming
    • Android
    • PHP
    • Java Script
    • MySQL
    • Postgresql
    • Flex
    • Web
  • Software
    • Mac OS
    • Windows
    • Linux
  • Web
You are Here » Home >> Information Technology >> Software >> How to Add WordPress Pages Without Adding Them to Navigation Menu

How to Add WordPress Pages Without Adding Them to Navigation Menu

February 14, 2010 by Lorensius Londa 4 Comments

Sometimes when creating a new page, we do not want the page appears on the page navigaton menu. WordPress itself does not provide that option when creating a new page. To apply it, we must change it manually in the header.php file located in the current active theme directory.

How to apply:

  • Create a new page and publish it
  • Edit the  header.php file located in the current active theme directory
  • Find the wp_list_pages function, add the argument exclude = id, where id is the id of the page that will be excluded. Use commas to separate each id if you want to exclude more than one pages, e.g. wp_list_pages ( ‘exclude = 20,21’).
  • To get the id of each page, go to the Edit Page menu, place the cursor on the edit link and get the id of the page found on the page url (wp-admin/page.php?action=edit&post=20).
Facebooktwitterredditpinterestlinkedinmailby feather

Related posts:

  1. How to Change Application Theme on Adobe Flex Builder 3
  2. How to Enable Theme in Google Apps
  3. Embed Google Static Map in Your Blog Pages Using GStaticMap Plugin
  4. How To Define Global Absolute Path in PHP

Filed Under: Information Technology, Software Tagged With: add page without menu, PHP, wordpress menu, wordpress page

About Lorensius Londa

Passionate web and mobile application developer. Co-founder of TRUSTUDIO, loves programming, Android, aviation, travelling, photography, coffee and gym mania.

Reader Interactions

Comments

  1. Shubhamoy says

    March 7, 2010 at 2:01 am

    Hi Admin,

    Thanks a lot for the post. It saved my lot of time since I was planning for a plugin but didn’t that its so simple.

    BR,
    Shubhamoy

    Reply
  2. Muslim says

    April 29, 2010 at 1:10 am

    just to let you know i have found a perfect plugin called “Hide pages”

    Reply
  3. karthimx says

    November 17, 2011 at 6:25 pm

    Thanks a lot. I was searching to avoid a terms of use page from navigation, this helped me.

    Reply
  4. Alvawjcmyhd says

    November 28, 2013 at 11:34 am

    I found this informative and interesting blog, i think its very useful and knowledge able.
    I would like to thank you for the efforts you have made in writing this article.
    I am hoping the same best work from you in the future.
    My homepage:
    http://isabelmarant10.metroblog.com/don_t_call_me | http://isabelmarant10.metroblog.com/don_t_call_me

    http://ghjt.seesaa.net/article/381291301.html | http://ghjt.seesaa.net/article/381291301.html

    http://louisvuitton51.livejournal.com/37875.html | http://louisvuitton51.livejournal.com/37875.html

    Post by: jia you hottags251.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About Me

A husband, father of two, passionate software developer, diy lover and home baker who loves to learn new things. Read More…

  • Facebook
  • GitHub
  • Google+
  • Instagram
  • Twitter
  • YouTube

Featured Articles

How to Setup MQTT Server Using Mosquitto and Libwebsocket on Freebsd

Blue Bamboo P25 Printer Android Demo Application With Source Code

Simple JSON RPC Client for Android

How to Send Message to Google Cloud Messaging (GCM) Server Using JSON and PHP

Footer

Recent Comments

  • Aditya Dabas on About
  • Ayten Göksenin Barutçu on How to Make Android Map Scrollable Inside a ScrollView Layout
  • mang jojot on About
  • Hussain on How to Programmatically Scan or Discover Android Bluetooth Devices

Recent Posts

  • How to Fix Blank Screen on WordPress Add/Edit Post Page
  • How to Programmatically Restart the ESP32 Board
  • How to Get Hardware Info of ESP32
  • How to Setup MQTT Server Using Mosquitto and Libwebsocket on Freebsd

Latest Tweets

To protect our users from spam and other malicious activity, this account is temporarily locked. Please log in to https://twitter.com to unlock your account.

Copyright © 2023 · Magazine Pro on Genesis Framework · WordPress · Log in