• I’m using the Twenty Twelve theme and have some extremely long pages. I’d like to create hyperlinks that enable a reader to jump to specific spots on the page. I used to be able to do this on my old, defunct Web site, but can’t seem to do it in WP. Have tried the old HTML tricks a name and a id — and yes, I did include the hashtag at the anchor point, but nothing works. Is there a way to this that I haven’t tried yet, or is it just something that WP won’t allow?

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anchor tags works fine, I’ve done it on countless WordPress sites.

    Example:

    <a href="#anchor1">Anchor 1</a>
    <a href="#anchor2">Anchor 2</a>
    
    // lots of text
    
    <div id="anchor1">
    // some div content
    </div>
    
    // lots more text
    
    <div id="anchor2">
    // some div content
    </div>

    Also just an FYI using <a name="whatever"> is outdated and you should do it like the example above.

    Thread Starter IBIT

    (@ibit)

    Thanks, guys. QUESTION: Do I need to include the entire URL in the anchor tag, or can I get away with just the name of the anchor?

    Just like the example above. Not the entire URL.

    Thread Starter IBIT

    (@ibit)

    It works…PERFECTLY! Many thanks to you both!

    Thread Starter IBIT

    (@ibit)

    Okay, next question: Now that readers can skip section-by-section at will, I need to create a “BACK to TOP” link. If a name and a id are deprecated, how do I do that?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Navigating to a specific spot on a page in WP’ is closed to new replies.