Support » Fixing WordPress » link to spot on SAME PAGE wont work

  • Resolved JanChristian

    (@janchristian)


    I’m trying to jump to a spot on the same but it isn’t working. The link is in the header and the anchor is on the About page.

    In the header I have the link as:

    <h2 id="nav4">
            <a href="/about#contact" title="Contact"><img src="http://grenadegearusa.com/wp-content/uploads/2011/04/contact.png" alt="Contact" /></a>
          </h2>

    On the About page I have the anchor as:
    <a name="contact"></a>

    It wont work. When I click the “CONTACT” header link it just (re)opens the ABOUT page.

    Any ideas?
    grenadegearusa.com/about

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Try putting the anchor on an id instead.

    I usually put them on heading tags. Are there any on your contact page?

    For example:

    <h1 id="contact">Contact Us</h1>

    I added a / before the # and it works now.

    <a href="/about/#contact" title="Contact">

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘link to spot on SAME PAGE wont work’ is closed to new replies.