Title: query string
Last modified: September 1, 2016

---

# query string

 *  [wchristian](https://wordpress.org/support/users/wchristian/)
 * (@wchristian)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/query-string-3/)
 * Hi, Great plugin and works very well. I have created a custom template querying
   a custom db table with a query string. It works as expected without a query string
   but when a query string is added the page shows the correct content but the pdf
   shows with out. i.e /?var=value&pdf. It is like the GET can not be used. is there
   any way to pass parameters?
 * Many Thanks
 * [https://wordpress.org/plugins/wp-pdf-templates/](https://wordpress.org/plugins/wp-pdf-templates/)

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

 *  [voltagekc](https://wordpress.org/support/users/voltagekc/)
 * (@voltagekc)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/query-string-3/#post-9070975)
 * I know this is an old topic but I came across the same issue. I was able to get
   it to work by modifying the wp-pdf-templates.php file on lines 208 and 209:
 *     ```
       $permalink = get_the_permalink() . '?' . $_SERVER['QUERY_STRING'];
       $url = parse_url($permalink);
       ```
   
 * and line 253:
 * `$link = $permalink;`
 * It seems like since the plugin was just using get_the_permalink it wasn’t taking
   the query string into account at all.
    -  This reply was modified 8 years, 11 months ago by [voltagekc](https://wordpress.org/support/users/voltagekc/).
 *  [candell](https://wordpress.org/support/users/candell/)
 * (@candell)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/query-string-3/#post-9332588)
 * Hi guys, how are you grabbing the values, I tried $_GET[“myvar”]; without success.
 * Also, are POST methods out, are we limted to GET?
 *  [ngupta123](https://wordpress.org/support/users/ngupta123/)
 * (@ngupta123)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/query-string-3/#post-9474823)
 * Any way to pass logged in user data, since no pdf is generating for restricted
   site
 *  Plugin Author [Viljami Kuosmanen](https://wordpress.org/support/users/zuige/)
 * (@zuige)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/query-string-3/#post-9474861)
 * Just add
 * `define('FETCH_COOKIES_ENABLED', true);`
 * to your wp-config.php
 *  [candell](https://wordpress.org/support/users/candell/)
 * (@candell)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/query-string-3/#post-9475095)
 * Hi Viljami, is your response to address the querystring question or the logged
   in data question?
 * Thanks
 *  Plugin Author [Viljami Kuosmanen](https://wordpress.org/support/users/zuige/)
 * (@zuige)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/query-string-3/#post-9475129)
 * Oh, right. It’s actually just for the logged in data question. Sorry.
 * For the query string issue, I’m not at all sure why this is happening.
 *  [candell](https://wordpress.org/support/users/candell/)
 * (@candell)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/query-string-3/#post-9475448)
 * Hmm, so I should be ok to use $_GET[“myvar”] on the template page? I’ll do some
   debugging when I get chance…

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

The topic ‘query string’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-pdf-templates_ffffff.svg)
 * [WordPress PDF Templates](https://wordpress.org/plugins/wp-pdf-templates/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-pdf-templates/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-pdf-templates/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-pdf-templates/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-pdf-templates/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-pdf-templates/reviews/)

 * 7 replies
 * 5 participants
 * Last reply from: [candell](https://wordpress.org/support/users/candell/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/query-string-3/#post-9475448)
 * Status: not resolved