Return to Support

How to link to different positions within a page?

Home Forums Graphene WordPress theme Support How to link to different positions within a page?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2849
    bradley1
    Member

    The Graphene theme allows you to make any text into a link to a particular page on your website. But can you make it link to a particular POSITION within a page?

    Say, for example, I have some text in which I make reference to a particular paper listed in my Bibliography that is on another page. Can I make the link not only go to the Bibliography page, but also go to the specific line on that page that lists the paper I am referring to?

    #22257

    The short answer is yes, you can. The long answer is that you will need to use the HTML editor. Surround the text you want to link to with anchor name tags, like this:

    <a name="link1">Paper that I'm linking to</a>

    (This will appear as normal text.)

    To link to that location, you’ll need to use a link like this:

    <a href="http://www.example.com/index.html#link1">Read this paper</a>

    You can read this page for more information:

    http://www.w3schools.com/tags/att_a_name.asp

    and this one:

    http://www.w3schools.com/html/html_links.asp

    Like I said, you’ll need to use the HTML editor, which I don’t often use, so this is untested. YMMV.

    #22258
    Josh
    Member

    And you might also wish to give my plugin a try. It allows you to use “anchors” through a visual editor rather than having to type out the HTML. You can test-drive it by clicking the link just below my post… “Ultimate Tinymce”.

    #22259
    macwana
    Member

    Thanks, Kenneth and Josh, for your help; I got the links to work properly. After a little trial-and-error, it turns out that the correct way to write the HTML code to reference a particular line on another page turned out to be:

    <a href="http://www.myWebsite.com/BibliographyPage.#ref>Read this paper</a>

    Apparently, I don’t need to include the “.html”. In fact it doesn’t work if I include it. Anyway, thanks again.

    P.S. What does “YMMV” mean?

    #22260
    Josh
    Member

    Haha… Ken is the acronym king on this site!!

    YMMV = Your Mileage May Vary

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.