Title: URL as shortcode parameter
Last modified: August 21, 2016

---

# URL as shortcode parameter

 *  [brave.pineapple](https://wordpress.org/support/users/bravepineapple/)
 * (@bravepineapple)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/url-as-shortcode-parametr/)
 * Is it possible to make URL address a shortcode parameter?
 * let’s say I have a shortcode [shops city=”<–here goes parameter from URL”]
 * Regards

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/url-as-shortcode-parametr/#post-3813941)
 * Sure, see [Function Reference/add shortcode](http://codex.wordpress.org/Function_Reference/add_shortcode).
   In particular note the examples using attributes and content. While the examples
   are trivial, the basic concept is illustrated. You callback function can apply
   whatever convoluted logic is required and return any content needed to replace
   the shortcode occurrence in the content.

Viewing 1 replies (of 1 total)

The topic ‘URL as shortcode parameter’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/url-as-shortcode-parametr/#post-3813941)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
