Title: PHP Query Question
Last modified: August 18, 2016

---

# PHP Query Question

 *  Resolved [Belmont](https://wordpress.org/support/users/belmont/)
 * (@belmont)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/)
 * Hey Folks,
 * Im having some problems using php inside my WP pages and posts, ive installed
   the run php hack and it doesnt appear to have resolved the issues so figured 
   id start a post.
 * What im trying to do is include a link such as this..
 * [http://www.domain.com/?&lt](http://www.domain.com/?&lt);?php echo “$QUERY_STRING”;?
   >
 * Inside my posts and/or the page template itself but WP seems to be stripping 
   off the end of the php query.
 * Any idea how i can get this to work?
 * TIA for any help.

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

 *  Thread Starter [Belmont](https://wordpress.org/support/users/belmont/)
 * (@belmont)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285154)
 * As you can from the above link, thats EXACTLY whats happening in my WP blog LOL
 *  [McShelby](https://wordpress.org/support/users/mcshelby/)
 * (@mcshelby)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285161)
 * You can try my [Exec PHP](http://soeren-weber.net/post/2005/08/18/50/) plugin.
   I wrote it specifically to have a more advanced quote handling than the other
   known PHP plugins.
 *  Thread Starter [Belmont](https://wordpress.org/support/users/belmont/)
 * (@belmont)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285208)
 * I have that plugin installed and it doesnt work 🙁
 *  [McShelby](https://wordpress.org/support/users/mcshelby/)
 * (@mcshelby)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285222)
 * You said, you’ve installed the run php hack. So which one did you really installed.
   Is there a link to see the outcome?
 *  Thread Starter [Belmont](https://wordpress.org/support/users/belmont/)
 * (@belmont)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285225)
 * Ive installed them both.
 * You can see whats happening in the link i posted above.
 * But you can also see it at [http://www.hardcorepride.com](http://www.hardcorepride.com)
   too.
 *  Thread Starter [Belmont](https://wordpress.org/support/users/belmont/)
 * (@belmont)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285226)
 * If you click on this link to go to the site..
 * [http://www.hardcorepride.com/?1234](http://www.hardcorepride.com/?1234)
 * What i want is for the ?1234 part to carry across to the url on the page, in 
   normal php/html pages it works fine just not in WP or any of the other 25 blogs
   ive installed trying to get it to work 🙁
 *  [McShelby](https://wordpress.org/support/users/mcshelby/)
 * (@mcshelby)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285273)
 * You may want to try this:
 * `<?php echo $_SERVER["QUERY_STRING"]; ?>`
 *  Thread Starter [Belmont](https://wordpress.org/support/users/belmont/)
 * (@belmont)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285278)
 * Excellent thanks so much for the help 🙂

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

The topic ‘PHP Query Question’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [Belmont](https://wordpress.org/support/users/belmont/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/php-query-question/#post-285278)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
