Title: hard code in theme sidebar
Last modified: August 18, 2016

---

# hard code in theme sidebar

 *  [moka](https://wordpress.org/support/users/moka/)
 * (@moka)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/hard-code-in-theme-sidebar/)
 * Apparently there is some hard code in my theme’s sidebar for the Nav section:
 *  <li >< a href=”/about/”>About< /a>< /li>
    <li >< a href=”/contact/”>Contact</
   a>< /li> <li >< a href=”/archive/”>Archive< /a>< /li>
 * I’ve created the pages through the WP interface, but I have no idea how to modify
   the code to link to them.
 * Thanks in advance for your help!

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/hard-code-in-theme-sidebar/#post-336272)
 * Go admin > Manage > Pages and look at the ID# of the Pages.
    Let’s say “About”
   has an ID# 34. >> `<li><a href="<?php bloginfo('url'); ?>/?page_id=34">About</
   a></li>`
 * In this way the link will work from every page/view.
 * (For posting small code snippets in the forum – without being rendered – use 
   the “backticks”, see instructions below the input area)
 *  Thread Starter [moka](https://wordpress.org/support/users/moka/)
 * (@moka)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/hard-code-in-theme-sidebar/#post-336278)
 * Thank you, moshu! That worked perfectly. 🙂

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

The topic ‘hard code in theme sidebar’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [moka](https://wordpress.org/support/users/moka/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/hard-code-in-theme-sidebar/#post-336278)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
