Title: Menu Navigation Issues
Last modified: August 19, 2016

---

# Menu Navigation Issues

 *  Resolved [james_barrett](https://wordpress.org/support/users/james_barrett/)
 * (@james_barrett)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/menu-navigation-issues/)
 * Quick question.
 * I have a menu system that an arrow chases your mouse and stays on the selections
   that you click. But gets broken when you get to a search page.
 * It either does not work or if I code an else if then all of the li’s get a class
   of selected. I need it to stay on the li that was selected when you searched.
   Please look at my code and tell me what I am doing wrong.
 * [Code Snippet](http://pastebin.com/embed_js.php?i=T3uUaEzj)
 * Any help on this would be great.
 * Thanks,
    James

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

 *  [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/menu-navigation-issues/#post-1940430)
 * Why not just use the built-in WordPress Menus feature? It will automatically 
   add class “current” or “current_menu_item” when you’re on that page.
 * Instead of all that code you just need to put wp_nav_menu();
 *  [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/menu-navigation-issues/#post-1940431)
 * Although that won’t solve the actual question you asked, which is when you do
   a search how do you keep the previous active page still marked as “selected”.
   I don’t know how to do this, or why you would want to do this. That page _isn’t_
   selected, so why would you want to mark it as such?
 *  Thread Starter [james_barrett](https://wordpress.org/support/users/james_barrett/)
 * (@james_barrett)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/menu-navigation-issues/#post-1940491)
 * I was thinking about it and I don’t really need to do that. I am just going to
   reset the navigation back to the Home tab. But thank you for looking at this 
   for me.
 * Thanks again,
 * James

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

The topic ‘Menu Navigation Issues’ is closed to new replies.

## Tags

 * [li](https://wordpress.org/support/topic-tag/li/)
 * [nav](https://wordpress.org/support/topic-tag/nav/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [james_barrett](https://wordpress.org/support/users/james_barrett/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/menu-navigation-issues/#post-1940491)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
