Title: Select list navigation help
Last modified: August 20, 2016

---

# Select list navigation help

 *  Resolved [orionjohnson](https://wordpress.org/support/users/orionjohnson/)
 * (@orionjohnson)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/select-list-navigation-help/)
 * I am creating a mobile theme for a friend, and their site is running on WordPress.
   On the mobile version, I want the navigation menu at the top to be a simple select
   list. I have that working just fine, but when you navigate to another page, I’d
   like the list to show you which page you’re on. I know this means adding the 
   attribute selected=”selected” to that option in the list when that page loads,
   but I’m not sure how to do that. Somehow I need to tap into WordPress knowing
   which page it’s on, and then maybe Javascript or something to add the attribute.
 * If anyone has some helpful tips on what code I can use to make this happen, I
   would be very thankful.
 * Here’s the code I have in place for the select list:
 *     ```
       <nav class="sections">
            <div class="mini">
                 <select name="sections" id="subsection-select">
                      <option>- Navigation -</option>
                      <option value="http://www.cwerksglobal.com">Home</option>
                      <optgroup label="philosophy">
                      <option value="http://www.cwerksglobal.com/values/">values</option>
                      </optgroup>
   
                      <optgroup label="capabilities">
                      <option value="http://www.cwerksglobal.com/marketing-strategy/">marketing strategy</option>
                      <option value="http://www.cwerksglobal.com/design/">design</option>
                      <option value="http://www.cwerksglobal.com/manufacturing/">manufacturing</option>
                      <option value="http://www.cwerksglobal.com/co-packing/">co-packing</option>
                      <option value="http://www.cwerksglobal.com/safe-quality-food/">safe quality food</option>
                      </optgroup>
                      <option value="http://www.cwerksglobal.com/contact/">contact</option>
                 </select>
            </div>
       </nav>
       ```
   

The topic ‘Select list navigation help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [orionjohnson](https://wordpress.org/support/users/orionjohnson/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/select-list-navigation-help/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
