Title: Dynamic Menu
Last modified: August 19, 2016

---

# Dynamic Menu

 *  [lalabirdbrains](https://wordpress.org/support/users/lalabirdbrains/)
 * (@lalabirdbrains)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/dynamic-menu-2/)
 * I cannot get the active page link to be highlighted. It’s stuck on home.
 * This is the code I am using in my header.php
 *     ```
       <div id="menu">
       		<ul>
       			<li class="page_item active<?php if (is_home()) echo ' 
   
       current_page_item'; ?>"><a href="<?php echo get_option('home'); ?>/">Home</a></li>
       			<?php wp_list_pages('title_li=' ); ?>
       		</ul>
       ```
   
 * I have page_item active set as
 *     ```
       #menu li .page item active a {
       	background: #07B6FE;
       	color: #FFFFFF;
       }
       ```
   
 * Can someone explain what I am doing wrong?

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/dynamic-menu-2/#post-1824395)
 * your css is somehow faulty – corrected below:
 *     ```
       #menu li .page_item.active a {
       	background: #07B6FE;
       	color: #FFFFFF;
       }
       ```
   
 * you could try styling the .current_page_item class
 *     ```
       #menu li .page_item.current_page_item a {
       	background: #07B6FE;
       	color: #FFFFFF;
       }
       ```
   

Viewing 1 replies (of 1 total)

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

## Tags

 * [dynamic menu](https://wordpress.org/support/topic-tag/dynamic-menu/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/dynamic-menu-2/#post-1824395)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
