Have you ever wondered how you could change the look of the Custom Menus provided by WordPress 3+? Here is a tutorial on creating a ‘Walker’ that will let you do that.
OK, so what is a ‘Walker’?
A Walker is just a bit of code that can process a list of items one at a time – it ‘walks’ the list. The walker is called once for each item, in order, and receives all the details about each item. It is responsible for assembling the details into the desired output for the item.
The tutorial shows you how to create a Walker that will add a short description to each top level menu item.
To add a non-clickable menu item to a WordPress Custom Menu, follow these steps:
- Open the Menu panel in Admin->Appearance->Menus.
- If you are starting a new menu, enter a name in the ‘Menu Name’ box and click ‘Save Menu’, otherwise click the name in the tabs above Menu Name.
- Under ‘Custom Links’ in the left column, enter a single pound sign (#) in the URL box.
- Enter the Label for the item in the Label box.
- Click ‘Add to Menu’.
- Position the item in the Menu by dragging it to the correct location.
- Click ‘Save Menu’.
Have you ever wished you could make life easier for the users of your theme by giving them some custom Theme Options? Well, here is how to do it in an Artisteer 18.104.22.168952 theme. This technique might work with other versions, but I have not tested it on any others.
The easiest way is to use the OptionTree plugin. Unfortunately, it conflicts with another plugin that I like to use. Besides, if I can avoid using a plugin by using just a bit of code, it is usually worth it.
I recently completed a project for an organization that wanted to have a ‘Members Only’ area for certain users. Their initial requirement was to have 3 groups of Members: Supervisor, Tutor, and Student, each with their own capabilities and content restricted to the group.
If you have an Artisteer theme, here is how to make the header area clickable. This has been tested with:
- WordPress 3.1.3
- Artisteer 3
- Firefox 5
- IE 9
- Chrome 12
First, make sure the Headline/Title is visible. Then, add the following lines to your style.css: Continue reading