Forums

How to link to a specific line inside post? (4 posts)

  1. radenpayas
    Member
    Posted 3 years ago #

    I wanted to link to a specific line or portion inside my post... how do I do this? I know how to do it if the file ends with .html but wordpress pages does not have any file extension and I'm lost... Thanks

  2. tomontoast
    Member
    Posted 3 years ago #

    Its exactly the same for any other html page. Just because wordpress doesn't have a .html doesn't change anything. You add an id attribute to a span or paragraph for example on the page http://example.com/blog/red/:
    <p id="here">bla bla bla</p>
    You would link to that section using the url http://example.com/blog/red/#here

  3. radenpayas
    Member
    Posted 3 years ago #

    I already tried this and it was not working... wordpress post does not en with html..

    This is what I did...

    Page address for example:
    "http://www.wordpressblog.com/2009/03/16/beautiful-woman/"

    The phrase that I am targeting inside the article for example is "Getting Married"

    I did:

    Getting Married

    I also tried:
    Getting Married

    and also:

    Getting Married

    None of them works...

  4. tomontoast
    Member
    Posted 3 years ago #

    That might be because there is no element with an id of getting married on the page you are linking to!! Try this link http://instantsolve.net/blog/#content
    See also http://en.wikipedia.org/wiki/Fragment_identifier

Topic Closed

This topic has been closed to new replies.

About this Topic