I am trying to set up a global navigation across my entire site (to be found in the header area). I do not wish to hardcode the links, but rather have them dynamically generated. Note that I use categories as navigational elements.
I currently have two “sub-blogs” installed upon my website. It is as follows:
– http://www.katskinner.com (the home page)
– http://www.katskinner.com/about (standard about page found in the main site)
– http://www.katskinner.com/contact (standard contact page found in main site)
– http://www.katskinner.com/writing/ (a sub-blog).
– http://www.katskinner.com/coding/ (a sub-blog).
I wish to display drop down menu’s for my header. So without scroll over the user will see:
– Home (katskinner.com)
If the user was to scroll over “writing”, they will see something like the following (and so forth for any sub-categories):
– category 1
– sub category 1
– sub category 2
– category 2
– category 3
How can I code this in wordpress?
just before the nav bar code put
<?php switch_to_blog(1); ?>
right after the navbar code put
<?php restore_current_blog(); ?>
then it will always show the pages from Blog #1.
For example, anyway. 🙂
To pull from multiple blogs, you;d have to do that a couple times for each one.
But on a large site, the switch_to_blog function gets expensive.
- The topic ‘Global Navigation Across Site’ is closed to new replies.