Can I use html editor to create targeted links?

  • Unknown's avatar

    Hello,
    I have a page on my blog which is in 8 sections (http://wp.me/P38CiH-55). I would like to reference individual sections in different posts and would like to do it without breaking up the page if at all possible. Is there a way to create a link to a particular spot in the body of the post?
    In other words, I have a post where I want to send readers to section 7 of the big page, is there a way to send them right to the beginning of section 7 without having to scroll through the first 6?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Howdy!

    Your question is part of the answer. :)
    Yes, you can make these links but you’ll need to add id tags to your sections in the post’s Text Editor. You can then link to them from any where you like (like a widget in your sidebar, or near the top of your post.)

    As an example, here’s how you’d create the link to “A Party of One.” Right now, you can find that bit in your text editor and it looks like this:

    <h2>Party of One
    October 28, 2009</h2>

    Change it just a bit to add an id tag, like this:

    <h2 id="party-of-one">Party of One
    October 28, 2009</h2>

    Once you save that change, you can now use this link to point to that specific section:

    http://playaday31.wordpress.com/about/some-samples/#party-of-one

    Just make sure to never use the same id twice, and don’t use spaces or any other character that cannot be included in URLs. Best to stick to lowercase letters, numbers, and hyphens.

    Let me know if you hit any snags. :)

    Best,

    -Alex G.

  • Unknown's avatar

    Thanks! I had a very amateurish interest in basic HTML over a decade ago, so I knew there was a way to do it, but didn’t know what it was. It’s working great now!

  • Unknown's avatar

    HTML goes a long way! Glad that’s what you needed. :)

    Let me know if you have any other questions.
    Best of luck finishing up NaNoWriMo, too.

    Cheers,

    -Alex G.

  • The topic ‘Can I use html editor to create targeted links?’ is closed to new replies.