How to Make a Link Direct to Any Place of Same Page

by Sayed
5 replies
Hi fellow warriors,

I need a WP plugin or the method used to allow the visitor when clicks a link in a page to be redirected to that link section in the same page.

I guess this is vague so, here's an example:

Internet - Wikipedia, the free encyclopedia

In the above link there's a block called 'Contents'
When you click on any link in this 'Contents' section, you'll be redirected to a lower place of the same page that corresponds to the link clicked.
How could I do the same in WordPress blogs?

Thanks in advance,

Sayed
#direct #link #make #page #place
  • Profile picture of the author leavewizard
    You need a book mark which is achievable via html itself.
    If you google html bookmark code - the first page explains it well.
    I hope it works!
    {{ DiscussionBoard.errors[6929496].message }}
  • Profile picture of the author Bootfit
    What you're looking to do is create 'named anchors'.

    Copy/paste this into a web page:

    <p><a href="#tom">A</a></p>
    <p><a href="#dick">B</a></p>
    <p><a href="#harry">C</a></p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p><a name="tom" id="tom"></a>1</p>
    <p><a name="dick" id="dick"></a>2</p>
    <p><a name="harry" id="harry"></a>3</p>

    A links to 1, B links to 2, C links to3

    Look at the relationship between <a href="#tom"> and <a name="tom" id="tom"></a> - this should help you work it out.
    {{ DiscussionBoard.errors[6929521].message }}
  • Hi Sayed,

    What you are looking at there is a Table of Contents block and you should be able to use this plugin to create one for your WP site.

    WordPress › Table of Contents Plus « WordPress Plugins

    Hope this helps!

    Shawn
    Signature
    Outsource to the experts...

    We customize your Blog, eBook, Press Release and Sale Copy content with your message.

    {{ DiscussionBoard.errors[6929567].message }}
  • Profile picture of the author Sayed
    Thanks guys, leavewizard's solution really works.
    I just wonder if there's a plugin can insert that code automatically!
    {{ DiscussionBoard.errors[6929722].message }}
  • {{ DiscussionBoard.errors[6929790].message }}

Trending Topics