
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
The second level navigation is by far the easiest, tried and tested method of the three. Section 3.1 will cover the second level menu coding and it’s usage.
To add these second level navigation, we simple use the tags that generate a string of categories (or archives) and place them beneath the main navigation menu and style appropriately.
For example, to add a list of categories below the main menu, add the following code in the header.php (assuming your main menu is in the header):
Note: the hide_empty tag unhides or hides unused categories.
Where to place the tag? Right below the template tag for page as described in the example below.
If we revisit the theme we created from the last exercise you will note that the main menu is displayed in the header in a single row.The code for this menu (simplified) looks like below:
We will add the category code below it to generate the second layer menu. The code to add will look something like this:
To easily style this second level, use the existing style for the main menu and make minor changes to the display (colors and such). In this case, we will enclose this second level in a div called “subwrap submenu”, the main menu is within a div called “wrap menu”.
February 12th, 2008 at 5:48 pm
Awesome! I’ve never really been that technically-oriented, but you’re breaking down how these themes are made makes it so much easier to digest, thanks so much!
February 12th, 2008 at 8:55 pm
@ CleverSage
Thank you. I am glad I could be of some use
February 15th, 2008 at 6:45 pm
Is it easy to customize the header on this theme w/ an image? I love it, but would like to plug in a logo instead of the text. Great work!
February 15th, 2008 at 10:46 pm
Also - I notice that the posts are short and then say “Read More.” Does it only display a certain number of characters and then readers will need to click? Is that an option that can be turned off so that the entire post can be displayed?
February 16th, 2008 at 5:56 pm
I love how you provide some code and explain the variations.
For instance, the navigation in the header and the template ttag and code your provided.