• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WPArena

WPArena

WPArena is a premium online resource site of WordPress and is focused on providing excellent WordPress Tutorials, Guides, Tips, and Collections.

  • News
    • Opinion
  • Tutorials
    • Errors
    • WordPress Security
  • Comparisons
  • Collections
    • Education Themes
    • Genesis Child Themes
    • Best Responsive Themes
    • Medical WordPress Themes
    • Finance & Business Themes
    • Crowdfunding Themes
  • Resources
    • Inspiration
  • Our Themes
  • Services
You are here: Home / Tutorials / How to Display Specific Pages/Links in WordPress Navigation Menu

How to Display Specific Pages/Links in WordPress Navigation Menu

February 22, 2008 by Editorial Staff Leave a Comment

specific menu items

If your WordPress blog has a navigation or top menu bar that shows all your WordPress pages and you create a lot of pages this can become quite cluttered. You can change this to specify the pages or links displayed from within your WordPress themes template files. This WordPress guide shows how to specify WordPress navigation page links.

First, your themes files will need to be writable in order to edit them from within the WordPress dashboard or you will need to edit the file and upload it with an FTP client. Another option is to edit the file in the hosting account file manager or make the theme’s files writable. From within the WordPress dashboard click Presentation or Appearance and then the Theme Editor. On the right side of the theme editor click, Header to open the header.php file. Depending on your theme you should see some code that looks like this:

    <div id="top-menu">
    <ul>
    <li><a <?php if (is_home()) echo('class="current" '); 
 ?>href="<?php bloginfo('url'); ?>">Home</a></li>
    <?php wp_list_pages('depth=1&title_li='); ?>

    </ul> </div>

The code in the parentheses after wp_list-pages is showing all pages you create and doing so can cause that list to grow quite large. You can just remove that code and hard code the actual pages you want in that area.

If you are a not familiar with editing WordPress themes make sure to copy all the code in the file and save it so you can restore any mistakes you might make!

Now just remove the bit of code in reading and replace it with a regular HTML formatted code like this:

    <div id="top-menu">
    <ul>
    <li><a <?php if (is_home()) echo('class="current" ');
    ?>href="<?php bloginfo('url'); ?>">Home</a></li>
    <a href="http://www.TheURL.com/" title="Page
    Title Here">Page Title Here</a>
    <a href="http://www.TheURL.com/" title="Page
    Title Here">Page Title Here</a>
    </ul> </div>

If you copy the above code to use it on your site and doesn’t work check for the proper format of all the quotes ” I tried to format them so they come through properly but may have missed one! To replace the curly quotes ” with regular ones just remove them and simply retype them again.

Now you can specify the exact page, or any URL for that matter simply by hard-coding it directly into your WordPress header.php file.

Filed Under: Tutorials

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Recent Topics

  • OceanWP Theme Review
  • Top SEO Agencies in the World [year] Reviewed & Compared
  • “Responsive” Theme Review
  • WordPress 6.9.4 Released: Features, Improvements, and Updates
  • How to build a WordPress Website from Scratch in 2026?

Footer

About us

WPArena is a premium online resource site of WordPress and is focused on providing excellent WordPress Tutorials, Guides, Tips, and Collections.

The site design is updated at regular intervals with more features. Look here.

You can read more about WordPress Arena here.

  • WPArena Marketing Material

Product Reviews

  • Beaver Builder Review
  • Blockonomics Review
  • WP User Frontend Pro Review
  • Imagely NextGEN Gallery Pro Review
  • Visual Product Designer Review
  • WP Event Manager Review

Top Resources

  • Choose a Domain name
  • Best WP Hosting Providers 2025
  • Start a WordPress Blog
  • WordPress Permalinks Structure
  • Email Management System
  • Envato Free Files of The Month

Copyright © 2026 · WordPress Arena - A Project of TechAbout LLC.

  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact