Title: Username Shortcode with URL string&#8230;
Last modified: October 10, 2021

---

# Username Shortcode with URL string…

 *  [ierick7](https://wordpress.org/support/users/ierick7/)
 * (@ierick7)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/username-shortcode-with-url-string/)
 * Hi,
 * I am building a member site, and I am creating special content where I need the
   Username Shortcode in the URL string.
    ex. `http://mywebpage.url/special-content/[
   username_shortcode]/the-content.php`
 * I essentially need to add this link to the “My Account” for all users, but I 
   want the [username_shortcode] to populate the link automatically.
 * Does anyone have a idea how to do this? I have had no luck as of yet on this,
   and hoping it’s pretty easy.
 * Thanks,
    ierick
    -  This topic was modified 4 years, 7 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Developing with WordPress
      topic

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/username-shortcode-with-url-string/#post-14959386)
 * Shortcodes will not work in HTML tag attributes like the `<a>` tag’s `href`. 
   They only work in regular content. What would work is to develop a new shortcode
   that is used to insert the entire user link, `<a>` tag and all.
    [https://codex.wordpress.org/Shortcode_API](https://codex.wordpress.org/Shortcode_API)

Viewing 1 replies (of 1 total)

The topic ‘Username Shortcode with URL string…’ is closed to new replies.

## Tags

 * [custom urls](https://wordpress.org/support/topic-tag/custom-urls/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/username-shortcode-with-url-string/#post-14959386)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
