Title: adding a navigation
Last modified: August 18, 2016

---

# adding a navigation

 *  [jmdesigner81](https://wordpress.org/support/users/jmdesigner81/)
 * (@jmdesigner81)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/)
 * I’d like to add a few navigation links/pages such as about, contact us, work 
   etc. I created a .php file called navigation.php, i tried using <?php get_navigation();?
   > in html but it didnt work. I was wondering if I could use static pages within
   my blog folder or if it has to be outside of that. I will be using a lot of static
   pages so i dont know how WP handles them. Any suggestion is helpful.

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [iand](https://wordpress.org/support/users/iand/)
 * (@iand)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224540)
 * try `<?php include "navigation.php"; ?>`
    that would get the file from with the
   current theme directory.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224541)
 * For the code you posted it has to be a function written to work.
    Just use simple
   include. I have also included a horizontal menu in my theme, called it `horizontal.
   php` and the code to call it was: `<?php include (TEMPLATEPATH . '/horizontal.
   php'); ?>` Change the filename and leave the rest – providing the file is in 
   the theme directory!
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224542)
 * `<?php include('path/to/navigation.php'); ?>`
    That should work.
 * You can put static pages anywhere so long as each page that will use any WP functions
   has a call to wp-blog-header at the top.
 * `<?php 
    require('./wp-blog-header.php'); ?>
 * Get the path to that file correct though.
 *  Thread Starter [jmdesigner81](https://wordpress.org/support/users/jmdesigner81/)
 * (@jmdesigner81)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224543)
 * Oh I see! I will try that! Thanks a lot!
 *  Thread Starter [jmdesigner81](https://wordpress.org/support/users/jmdesigner81/)
 * (@jmdesigner81)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224623)
 * Hey guys! I’m still getting in error “Warning: open_basedir restriction in effect.
   File is in wrong directory in /home/httpd/vhosts/pibstoughton.com/httpdocs/wp-
   content/themes/Jmdesign01/index.php on line 3”. I placed the navigation.php inside
   theme/jmdesign01(my theme) it giving me error. Any suggestions?
 *  Thread Starter [jmdesigner81](https://wordpress.org/support/users/jmdesigner81/)
 * (@jmdesigner81)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224625)
 * Check out the error message[Pib Stoughton](http://www.pibstoughton.com)
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224631)
 * What did you use to call the navigation.php file?
 *  Thread Starter [jmdesigner81](https://wordpress.org/support/users/jmdesigner81/)
 * (@jmdesigner81)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224642)
 * That’s what i’m using <?php include(‘navigation.php’); ?>
 *  [Lorelle](https://wordpress.org/support/users/lorelle/)
 * (@lorelle)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224646)
 * Make sure the “path” is set in your file reference. See above for specifics. 
   Like `/wp-content/themes/navigation.php`.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224647)
 * So you put this line of code in one or more of your template files (index, page,
   archive etc.) that are in the same theme-directory as the navigation file, right?
   
   Can you give it a try with the code I’ve showed above?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘adding a navigation’ is closed to new replies.

 * 10 replies
 * 5 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/adding-a-navigation/#post-224647)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
