Put an automatic link on every occurrence of a specific word?

Discussion in 'HTML & Website Design' started by avatar33, Sep 20, 2009.

  1. #1
    Hi guys,

    I am looking for a way to put an automatic link on every occurrence of a certain word over all the pages on my site.

    Say for example the word "lawyer"... On every page all over my site, I want this word to be linked to a lawyer website.

    How can I achieve that? I know there must be some tools out there that do this kind of stuff...

    Cheers
     
    avatar33, Sep 20, 2009 IP
  2. thompsonshere

    thompsonshere Peon

    Messages:
    102
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What kind of website is this. wordpress or joomla based..
     
    thompsonshere, Sep 20, 2009 IP
  3. avatar33

    avatar33 Well-Known Member

    Messages:
    469
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    143
    #3
    it's none. It's custom built.
     
    avatar33, Sep 20, 2009 IP
  4. Nytrolix

    Nytrolix Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If its ASP and your getting the text from a database you can do this.

    content= rs("content")
    content= Replace(content, "lawyer", "<a href='www.lawyers.com'>lawyers</a>")

    response.write content
     
    Nytrolix, Sep 21, 2009 IP