WordPress.org

Ready to get started?Download WordPress

Forums

converting text into a link that searches for that text (2 posts)

  1. oarsman
    Member
    Posted 1 year ago #

    What I want to be able to do, while editing a post, is to easily change some text into a link that searches a website for that text.

    For example, if the post had the term "castle", I would like to be able to highlight (or any other method of selecting the term) and have that text become a link to a search from a website for that term.

    I edit a wordpress site that has not yet gone public where this will be a very common occurrence. My strength is in editing english, not code. I can copy the search result address into a hyperlink for that text manually, but it is not realistic to do it one at a time.

    I looked for a plugin or shortcode that would do this for me, but I was unable to find one either because it does not exist or because my searches were poorly defined.

  2. michael.mariart
    Member
    Posted 1 year ago #

    It's quite easy in WordPress. If you're doing it for a single word, it's this:

    http://mysite.com/?s=word

    If you're going to search for multiple words, you would have a + between them instead of a space:

    http://mysite.com/?s=two+words

Topic Closed

This topic has been closed to new replies.

About this Topic