Title: Menu code
Last modified: August 18, 2016

---

# Menu code

 *  [kubble](https://wordpress.org/support/users/kubble/)
 * (@kubble)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/menu-code/)
 * I’d like to implement the menu found at:
    [http://css.maxdesign.com.au/listamatic/horizontal26.htm](http://css.maxdesign.com.au/listamatic/horizontal26.htm)
 * Can anyone help me with the code that will make the highlighted button correspond
   when it’s on the page it’s associated with. In other words, how do I get “item
   2” to be highlighted if I’m on page [http://www.website.com/item](http://www.website.com/item)
   2.

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

 *  [uscfan](https://wordpress.org/support/users/uscfan/)
 * (@uscfan)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/menu-code/#post-163372)
 * `<id="active"><a href="#">Item one</a></li>
    <li><a href="#">Item two</a></li
   > <li><a href="#">Item three</a></li> <li><a href="#">Item four</a></li> <li>
   <a href="#">Item five</a></li> Notice how ‘Item One’ has been given the id active,
   the style active contains the information to make that piece of the navigation
   higlighted. Basically, for each page, you would have to set the id of the bar
   to active and remove active from the other area. For instance, if you would like
   to switch to Page 2 and have it highlighted the code you would use is as follows:
 * `<li><a href="#">Item one</a></li>
    <li id="active"><a href="#">Item two</a></
   li> <li><a href="#">Item three</a></li> <li><a href="#">Item four</a></li> <li
   ><a href="#">Item five</a></li>
 * Notice how the first line no longer has the id=”active” and now the second line
   does. Now, if you mean, how can different pages in wordpress, such as ‘www.website.
   com/?page_id=2’, automatically highlight that button for that page, I don’t know
   how to do that, I tried. But possibly you coult look into the custom fields that
   wordpress allows. Check those out at [http://codex.wordpress.org](http://codex.wordpress.org).
 * Hope it helps!
 *  Thread Starter [kubble](https://wordpress.org/support/users/kubble/)
 * (@kubble)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/menu-code/#post-163374)
 * Thanks!

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

The topic ‘Menu code’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [kubble](https://wordpress.org/support/users/kubble/)
 * Last activity: [21 years, 2 months ago](https://wordpress.org/support/topic/menu-code/#post-163374)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
