Title: Show query strings in post?
Last modified: August 19, 2016

---

# Show query strings in post?

 *  [cLin](https://wordpress.org/support/users/clin/)
 * (@clin)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/show-query-strings-in-post/)
 * How would I include the value of queries in my link into my posts? For example,
   if the link is [http://www.domain.com/?id=12345](http://www.domain.com/?id=12345)
   I’d like to be able to put “12345” into my posts. Right now I am using exec-php
   plugin and I place
    code:
 * `<?php $id = strip_tags($_REQUEST['id']);?>`
 * in the header.php but when I try to echo $id, it comes out empty. It’s like it’s
   not passed into the posts and someone mentioned it might be a scope problem so
   I tried placing global $id into the post as well but no go. So an example post
   would be like this:
 *     ```
       blah blah blah come check out the product <a href="http://www.domain.com/?id=<?php echo $id;?>">here!</a>
       ```
   
 * This is for a rss feed for my affiliates for a product I’m promoting, I want 
   to be able to pass their affiliate code into the blog so they can just use this
   feed for whatever purpose they need.

The topic ‘Show query strings in post?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [cLin](https://wordpress.org/support/users/clin/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/show-query-strings-in-post/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
