Forums

Anchor Tags Do Not Link Within Page - Leap to Homepage Instead (3 posts)

  1. WendyWeb
    Member
    Posted 2 years ago #

    I would like to create an anchor tag that always links from the top of the page to a Flickr photo gallery at the bottom of the page where I would have an anchor called photos.

    I created the anchors
    <a href="#photos">Photo Gallery</a>
    and the anchor tag in the location I want to go to
    <a name="photos"></a>
    but the link takes me out of the specific permalink page and back to my homepage. (i.e. the tags do not work in WordPress the way they do in html where you do not have to enter a full URL)

    Obviously if I want to fix this on the one specific page I could write the full URL, but since I wanted to make this a quick tag that colleagues can insert anywhere quickly, I wanted it to really work as a standard anchor within any page without having to fiddle with getting the full URL each time.. Any suggestions, solutions?

  2. gbcecil
    Member
    Posted 2 years ago #

    Put the following code in html view where you want to start out at.

    <A href="#your_tag_name_here">Your own words here</A>

    Put the following code in html view where you want to finish.

    <A id="your_tag_name_here" name="your_tag_name_here">Your own words here</A>
    Make sure you start and finish in HTML view. Also, make sure you use capital A ( <A href=)

    Thats it. For an example of it working go here.
    globalministrymedia.com/?page_id=27

  3. Mark / t31os
    Moderator
    Posted 2 years ago #

    Make sure you start and finish in HTML view. Also, make sure you use capital A ( <A href= )

    Errr, what? You don't need to use a capital letter, and infact, XHTML specification requires that tags and attributes all be lowercase.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.