Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Limit the Number of Pages in Your Wordpress Navigation Bar

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,102
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 13, 2009

http://www.trafficisgold.com/ Using the include function in Wordpress you can specify the exact number of pages you want to show in your navigation.

Example: Show traffic is gold.
You need to edit the header.php file found here:
wp-content/themes/your-theme/header.php

Open the file with your favorite editor.
Search the file for wp_list_pages

Find This:
php wp_list_pages('title_li=&depth=4&sort_column=menu_order);

Change to this:
php wp_list_pages('title_li=&depth=4&sort_column=menu_order&include=2,7,6,112,5');

Upload the file and your site should only show the pages you've indicated.

http://www.trafficisgold.com/
http://twitter.com/trafficisgold

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (TrafficIsGold)

  • this is well done, except for the fact that my header.php has no wp_list_pages :-(

    nav must come from somewhere else in some themes ?

  • @theezvideoguy If you list your theme maybe I can find it for you.

Video Responses

see all

All Comments (4)

Sign In or Sign Up now to post a comment!
  • Thanx for such a nice video..i was looking for some thing like this..you rock friend :) keep up the good work

  • Very good video but i have a problem, i would like to change my top-nav from pages to categories. I have a basic understanding of PHP and CSS, how do i go about doing that. by the way im using the wpchatter theme MY SITE IS ON MY HOME PAGE.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more