Title: make shortcode with user_id variable
Last modified: May 26, 2021

---

# make shortcode with user_id variable

 *  Resolved [oberning](https://wordpress.org/support/users/oberning/)
 * (@oberning)
 * [5 years ago](https://wordpress.org/support/topic/make-shortcode-with-user_id-variable/)
 * Hi,
 * Is there a possibility to get a shortcode of the switching link where the user_id
   is the variable?
    [switch-link user-id=”5″]
 * Best regards,
    Olga

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

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [5 years ago](https://wordpress.org/support/topic/make-shortcode-with-user_id-variable/#post-14485862)
 * The short answer is no, sorry, this isn’t something that I’ll be adding. I know
   there are plugins out there that allow you to turn a PHP snippet into a WordPress
   shortcode though, you could try one of those.
 * John
 *  Thread Starter [oberning](https://wordpress.org/support/users/oberning/)
 * (@oberning)
 * [5 years ago](https://wordpress.org/support/topic/make-shortcode-with-user_id-variable/#post-14488783)
 * Thank you for you reply 🙂

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

The topic ‘make shortcode with user_id variable’ is closed to new replies.

 * ![](https://ps.w.org/user-switching/assets/icon.svg?rev=3193956)
 * [User Switching](https://wordpress.org/plugins/user-switching/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-switching/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-switching/)
 * [Active Topics](https://wordpress.org/support/plugin/user-switching/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-switching/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-switching/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [oberning](https://wordpress.org/support/users/oberning/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/make-shortcode-with-user_id-variable/#post-14488783)
 * Status: resolved