Support » Fixing WordPress » 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)
  • 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

    (@moka)

    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.