Title: URL replace
Last modified: August 19, 2016

---

# URL replace

 *  [appzguru](https://wordpress.org/support/users/appzguru/)
 * (@appzguru)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/url-replace/)
 * Hello,
 * i have a problem i cant figure out..
 * I want to create shortcode like [gsm $brand=8810]
    that creates a link like this:
   [http://gsm.com/8810](http://gsm.com/8810)
 * This is what i came up with, but it aint working:
 *     ```
       function gsm_url($brand) {
       echo "<a href='http://gsm.com/$brand>$brand'</a>";
       }
   
       add_action('gsm','gsm_url');
       do_action('gsm');
       ```
   
 * Where do i go wrong?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/url-replace/#post-1149852)
 * [http://codex.wordpress.org/Shortcode_API](http://codex.wordpress.org/Shortcode_API)
 *  [dor](https://wordpress.org/support/users/dor/)
 * (@dor)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/url-replace/#post-1149977)
 * [http://wordpress.org/extend/plugins/replace](http://wordpress.org/extend/plugins/replace)
 * 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘URL replace’ is closed to new replies.

## Tags

 * [add_action](https://wordpress.org/support/topic-tag/add_action/)
 * [do_action()](https://wordpress.org/support/topic-tag/do_action/)
 * [string replace](https://wordpress.org/support/topic-tag/string-replace/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [dor](https://wordpress.org/support/users/dor/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/url-replace/#post-1149977)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
