Title: Modifying nav-menu from localhost
Last modified: August 21, 2016

---

# Modifying nav-menu from localhost

 *  [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/)
 * Hi
 * I have set a XAMPP server to modify my website in the localhost. The main page
   is displayed perfectly, but links are generally bad configured. I have been looking
   for the file from my wp-content which I should modify in order to set the new
   local href for menu correctly, but I didn’t find where they are codified. Could
   somebody tell me where I could modify the href of the navigation menu items?
 * Thank you

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/page/2/?output_format=md)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4143992)
 * > links are generally bad configured
 * In what way? You really need to provide a lot more detail before we can possibly
   help.
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4143995)
 * I would like to set new hrefs for the menu options that appear in my site, but
   do not find the code where it is define. Where could I find it?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4143996)
 * We need **details**!
    Is this a custom menu? What theme are you using? What is
   wrong with the current urls?
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144055)
 * Right now, when I click on a link in the main page which loads z.php, the error
   I get is:
 * Fatal error: Call to undefined function get_header() in C:\x\xampp\htdocs\web\
   wp-content\themes\y\z.php on line 7
 * z.php loads the header at the beginning of the code, with the following line:
   
   <?php get_header(); ?>
 * I have a header.php file in \x\xampp\htdocs\web\wp-content\themes\y\, but I guess
   it is not found. What is the reason of this fact?
 * Thank you
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144058)
 * I have been looking around the forum in order to find a solution. This fatal 
   error is quite common and i found the same problem in the following post:
    [http://wordpress.org/support/topic/call-to-undefined-function-get_header-7](http://wordpress.org/support/topic/call-to-undefined-function-get_header-7)
 * In my case, the main file loads perfectly, but this one loads a sidebar file,
   which contains the code:
 *     ```
       <a href="/product-guide"><img src="<?php bloginfo('template_directory'); ?>/images/sidebar-cat.jpg"></a>
   
       		<div class="txt">
       			<h4>Visit our product guide</h4>
       			<a href="wp-content/themes/i/guide.php">View guide</a>
       		</div>
       ```
   
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_
 * The image is not found and the link to guide.php displays the fatal error mentioned
   above. The file guide.php has the code:
    <?php get_header(); ?> And here is where
   it goes wrong.
 * My mistake, which i deduce from the other forum topic, is that the href to View
   guide is not correct, but how can I fix it????
 * All files (guide, index, header, sidebar, footer…) are located in the template
   folder.
 *  [Vitaliy K](https://wordpress.org/support/users/vitaliy-k/)
 * (@vitaliy-k)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144061)
 * Hi there
    Try replace `<a href="wp-content/themes/i/guide.php">View guide</a>`
   with `<a href="<?php bloginfo('template_directory'); ?>/i/guide.php">View guide
   </a>` let me know if this helps, or I need more detailed description to help 
   you.
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144066)
 * i changed it, but it did not work. In this case, the fatal error is gone, but
   i got a Not located object. In the whole page, most of the links are not working,
   but as I said before, the menu items brought me to Not located object page also.
   Is it possible that the problem is in the absolute URL, or something like this?
 *  [Vitaliy K](https://wordpress.org/support/users/vitaliy-k/)
 * (@vitaliy-k)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144067)
 * can i see guide.php code? is this a template? it’s assigned for any page?
    if
   not you can define this page as template by adding to the top of guide.php this
 *     ```
       /*
        * Template Name: Guide Page
        */
       ```
   
 * After this you will be able to create page from admin and assign this template
   to this page. And you will be able to use absolute URL to this page. make sense?
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144068)
 * This is the beginning of the guide.php code:
 *     ```
       <?php
       /*
       Template Name: Guide
       */
       ?>
   
       <?php get_header(); ?>
   
       <div class="bg-page">
       ```
   
 * The code following just displays a pdf embedded. And yes, it is assigned for 
   the page “Product guide” in the menu items from wordpress, defined in the backend.
 *  [Vitaliy K](https://wordpress.org/support/users/vitaliy-k/)
 * (@vitaliy-k)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144069)
 * what you see if you click “view” page (page with template Guide) from admin section?
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144076)
 * what do you mean from admin section?
 *  [Vitaliy K](https://wordpress.org/support/users/vitaliy-k/)
 * (@vitaliy-k)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144077)
 * Yes, while you inside page in admin section you have the link “View page” under
   title.
 * also can you turn on wordpress debuger before, just in case it shows more detailed
   error.
 * You can do this by opening wp-config.php file and change this line
    `define('
   WP_DEBUG', false);` to `define('WP_DEBUG', true);`
 * and after this try to view page and post here your results
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144078)
 * I do not have any line in the wp-config.php file saying anything similar to DEBUG…
 * From the admin section, in the Guide page, if I view page, I see the page i should
   see, with the navigation bar, and the information of the page (which mainly contains
   a pdf embedded).
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144079)
 * I did nothing in the .htaccess file, from the root folder. Is it necessary to
   set any change?
 *  Thread Starter [adminadminadmin](https://wordpress.org/support/users/adminadminadmin/)
 * (@adminadminadmin)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/#post-4144080)
 * I was still checking, and with the following code I got a redirection to localhost/
   xampp:
 *     ```
       <div class="txt">
       			<h4>Visit our product guide</h4>
       			<a href="<?php bloginfo('template_directory'); ?>/guide" class="boton">View guide</a>
       		</div>
       ```
   
 * Hovering over the button, i can see the right location of the files (including
   guide.php). If I add “.php” following “/guide” I get again the Fatal error:
    
   Call to undefined function get_header() in C:\xampp\htdocs\..\guide.php on line
   7.
 * Any new idea?

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/page/2/?output_format=md)

The topic ‘Modifying nav-menu from localhost’ is closed to new replies.

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 25 replies
 * 3 participants
 * Last reply from: [Vitaliy K](https://wordpress.org/support/users/vitaliy-k/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/modifying-nav-menu-from-localhost/page/2/#post-4144112)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
