Support » Fixing WordPress » How to install anchors

  • Hi,

    I have a section on my website called “library” with a list of authors. At the top of the page I put each letter of the alphabet and I want people to be able to click on the letter they want and be brought at the right place further down on the page. I know I probably need anchors to achieve this, but I don’t know how to install them. Do I need a plugin to do this, or is there an easier way?

    Thanks very much for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • It would be pretty simple to do that without a plugin.

    You can do it like this:
    <a href="#A">A</a> | <a href="#B">B</A> | <a href="#C">C</A> etc. .

    And then you would have this at the top of each section that you want it to point to:

    <a name="A"> </a>

    <a name="B"> </a>

    <a name="C"> </a>

    etc. . .

    Thanks very much! It works beautifully!

    Can you tell me the code to have a “top” anchor that would bring people back to the top of the page?


    Yup. It would really be the same HTML:

    <a name="top"></a> would go towards the top of the page, and then you would put:

    <a href="#top">TOP OF PAGE</a> Wherever you want the link.

    I personally would use something a little more subtle than BACK TO TOP as my text. Maybe something like this: <a href="#top"><small>^TOP</small></a>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to install anchors’ is closed to new replies.