Title: custom nav bar items
Last modified: August 19, 2016

---

# custom nav bar items

 *  [fitzpatrick512](https://wordpress.org/support/users/fitzpatrick512/)
 * (@fitzpatrick512)
 * [17 years ago](https://wordpress.org/support/topic/custom-nav-bar-items/)
 * Having trouble inserting some custom links in to the nav bar on the “excellence”
   theme.
 * It tried this, and it works fine in Firefox, but breaks in IE.
 *     ```
       <li class="page_item"<a href="http://www.billsboardonline.com/">Home</a></li><li class="page_item"<a href="http://www.billsboardonline.com/Classifiedads/">Classifieds</a></li><li class="page_item"<a href="http://www.billsboardonline.com/advertising.php">Advertise with Us</a></li><li class="<?php if (((is_home()) &amp;&amp; !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Blog Home<?php echo $langblog;?></a></li>
       ```
   
 * The biggest problem here is that I don’t really understand everything going on
   here:
 * `<li class="<?php if (((is_home()) &amp;&amp; !(is_paged())) or (is_archive())
   or (is_single()) or (is_paged()) or (is_search())) { ?>current_page_item<?php}
   else { ?>page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>">Blog
   Home<?php echo $langblog;?></a></li>`

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [17 years ago](https://wordpress.org/support/topic/custom-nav-bar-items/#post-1065769)
 * I’m not surprised it didn’t work. 3 out the 4 opening li tags weren’t properly
   formed. Plus the PHP syntax for ‘or’ is ‘||’.
 * Translation: If (this is the home page AND it isn’t paged) OR it’s an archive
   page OR a single post OR has a number of pages OR is a search result page, then
   assign it the class “current_page_item”. Otherwise, assign it the class “page_item”.
 * Corrected code: [http://wordpress.pastebin.ca/1409811](http://wordpress.pastebin.ca/1409811)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [17 years ago](https://wordpress.org/support/topic/custom-nav-bar-items/#post-1065771)
 * Double post removed

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

The topic ‘custom nav bar items’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/custom-nav-bar-items/#post-1065771)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
