Title: Dynamic Navigation Menu
Last modified: August 18, 2016

---

# Dynamic Navigation Menu

 *  [clay](https://wordpress.org/support/users/clay/)
 * (@clay)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/)
 * I wanted to created a dynamic menu which was easily administered and updatable.
   Previously I had a simple php script which parsed an array and displayed it in
   a list. However I couldn’t update the file dynamically and had to edit the file
   any time I wanted to change it.
    I am not too adept at programming- but the results
   can be seen at my site: [http://www.adailyadventure.com](http://www.adailyadventure.com)
   The menu at the top looks like your standard horizontal menu- However it is generated
   through a modified get_links function which accesses an alternate table from 
   the link manager. Menu items can be managed from the Admin panel so you can change
   the link any time you want without needing to upload or edit any files. The source
   is at: [http://www.adailyadventure.com/journal/dynamicmenu.zip](http://www.adailyadventure.com/journal/dynamicmenu.zip)
   Comments and assistance in improvement are greatly appreciated

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

 *  [steelsun](https://wordpress.org/support/users/steelsun/)
 * (@steelsun)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87118)
 * I’ll give this a try this weekend. Looks like it may be just the kind of thing
   I’m looking for.
    Thanks!
 *  Thread Starter [clay](https://wordpress.org/support/users/clay/)
 * (@clay)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87120)
 * Cool, if you have any problems with the instructions let me know- I am still 
   in shock I got it to work for me so I have no idea how it will go for someone
   else.
    It can certainly use some work I am sure- but I am at the end of my knowledge
 *  Thread Starter [clay](https://wordpress.org/support/users/clay/)
 * (@clay)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87294)
 * Has anyone installed this?
    Does it work? Is it worth it? Any improvements?
 *  Thread Starter [clay](https://wordpress.org/support/users/clay/)
 * (@clay)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87621)
 * I know some people have downloaded…
 *  [sdollen](https://wordpress.org/support/users/sdollen/)
 * (@sdollen)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87622)
 * Clay – I’ve downloaded and in the process of installing it now… so far no issues
   except that one of the instructions says to “Open or create my-hacks.php and 
   add:
    <?php require_once(‘wp-includes/navlinks.php’); ?>” Okay… is it saying 
   I need to create a new php file called “my-hacks.php”, include the line and then
   upload it to…??? my home directory? my wp-admin directory? That step has kind
   of lost me.
 *  Thread Starter [clay](https://wordpress.org/support/users/clay/)
 * (@clay)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87624)
 * Sorry about the confusion-
    If you upgraded from a version prior to 1.2 you may
   have a my-hacks.php file in the root wordpress directory already. 1.2 does not
   come with that file by default (it was replaced by the plugin function). So if
   it does not exist in the root directory of your blog, just create it. The only
   line it should include is the one in the instructions. In the admin panel, under
   Options> Miscellaneous make sure the ‘Use legacy my-hacks.php file support’ box
   is checked. Sorry if my explanations are not so clear- I don’t really know what
   I am doing!
 *  Thread Starter [clay](https://wordpress.org/support/users/clay/)
 * (@clay)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87666)
 * sdollen: did you ever get it to work?
 *  [sdollen](https://wordpress.org/support/users/sdollen/)
 * (@sdollen)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87667)
 * Clay –
    I couldn’t get it to work. I followed all of the steps up to and including
   Step 5. I added the info in my index.php file and then when I clicked update,
   I received the following error. Warning: Cannot modify header information – headers
   already sent by (output started at /home/stefan/public_html/my-hacks.php:42) 
   in /home/stefan/public_html/wp-admin/templates.php on line 74 Here is the code
   that error is referring to: $newcontent = stripslashes($_POST[‘newcontent’]);
   $file = $_POST[‘file’]; $file = validate_file($file); $real_file = ‘../’ . $file;
   if (is_writeable($real_file)) { $f = fopen($real_file, ‘w+’); fwrite($f, $newcontent);
   fclose($f); header(“Location: templates.php?file=$file&a=te”); <<— Line 74 } 
   else { header(“Location: templates.php?file=$file”); } Not sure if it had anything
   to do with having code already in the my-hacks.php file?
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87668)
 * sdollen – check your my-hacks.php file. if you have multiple php sections – startingwith
   <?php and ending with ?> – make sure there is NO WHITESPACE between the closing?
   > and the next opening <?php tag…. it should look just like this:
    ?><?php … 
   right next to each other. Also, after the final closing ?>, there should be no
   whitespace there either, not carriage return or space, nothing. This is the problem
   for that error 99.99999% of hte time. And, if you find that you do have ?><?php
   in there, you can actualy take that out, and leave it as one large php block 
   of code (preferable this way actualy.) TG
 *  [sdollen](https://wordpress.org/support/users/sdollen/)
 * (@sdollen)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87670)
 * Thanks TG, that did solve the problem. I completed the install and it did create
   the menu for me – but, I’m wondering what the difference between using the added
   Menu-nav and the Links options are? I can do the same thing already using the
   Links tab on the admin page.
    I’m a pretty green newb – but, the navigation menu
   worked fine.
 *  Thread Starter [clay](https://wordpress.org/support/users/clay/)
 * (@clay)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87671)
 * Sdollen: glad you got it to work.
    The differences between this added ‘navigation
   menu’ and the links menu: 1. It only displays 1 category 2. It grabs the category
   from a seperate table as the other links This allows you to dynamically create
   a navigation menu for your site, with links that do not appear in your regular
   links page. If you look at my site, that is all done using wordpress. I have 
   taken the LINKS out of the side menu and placed them in their own page- which
   is linked on the MENU up top. That menu uses the plugin(hack) you just installed.
   Do you have a link to your site I would like to see how you implemented it
 *  [ptryk](https://wordpress.org/support/users/ptryk/)
 * (@ptryk)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87768)
 * found a plugin of interest w/r/t dynamic menu’s includes highlighting, multiple
   levels.. or not….
    [http://www.adsworth.info/wp-pagesnav](http://www.adsworth.info/wp-pagesnav)

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

The topic ‘Dynamic Navigation Menu’ is closed to new replies.

 * 12 replies
 * 5 participants
 * Last reply from: [ptryk](https://wordpress.org/support/users/ptryk/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/dynamic-navigation-menu/#post-87768)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
