Getting “Menu links” to work in subdirectories?
-
I followed TechGnome’s tutorial for making static pages in WordPress.
I’ve separated my menu div into a file called staticmenu.php which is called into my index.php in the appropriate place via ‘<‘?php include_once(‘staticmenu.php’); ?’>’ and also into my static pages in the same way (all reside in the same root directory). I realize the menu links work because they are ‘relative’ links to my WP directory.
I would like to be able to call that same file into other php pages that DO NOT reside in the WP directory but rather in other subfolders. The idea being that edit changes to ‘staticmenu.php’ would transcend my entire site. Right now I am ‘viewing source’ from the rendered page, copying the rendered menu div into a second “re_menu.php” in a common includes subfolder which is being called into any pages in subfolders.
I’m trying to simplify having to edit 2 menu.php’s Can I edit staticmenu.php in some way, so the links work whether called to a page in the WP directory or to another subdirectory outside the WP directory? Or is my present approach what I am constrained to?
Thanks.
Kevin
- The topic ‘Getting “Menu links” to work in subdirectories?’ is closed to new replies.