URL Params

The URL Params WordPress Plugin allows you to access URL parameters in the Query String of the URL.

The plugin even allows you to specify a default value in the shortcode if the parameter isn’t set, so if you want to say “Hello, FirstName” and FirstName isn’t set, it could say something like “Hello, Friend!”

To specify a backup url parameter, enter multiple parameters seperated by commas. The plugin will check for each paramter, in order, until a matching one is found and return that. Failing finding any of the parameters you listed, the default will be returned. For example, you can specify [urlparam param="FirstName, First, name" default="Friend" /] to check for FirstName, and if not found, then First, if not found, then name, and if not, then just return “Friend”.

If the parameter is a date, you can also specify the dateformat option using a PHP friendly date format, for example [urlparam param="somedate" dateformat="F Js" /].

This is great if you have personalized links, like from Infusionsoft, as it lets you personalize a landing page with a persons name.

You can also use this to pre-fill out form fields for folks based on the querystring. For example, if their first name is passed in the URL, your landing page can greet the viewer by name and pre-fill their name on a form.

Installation: To install the plugin, download the zip file and upload via the plugin interface of your WordPress site.

I’m always open to suggestions and ideas on how to improve this plugin. Please make suggestions by commenting below.

18 Responses to “URL Params”

  1. Robert March 31, 2012 at 8:21 am #

    I tryed this nice plugin.

    It seems to work (partly)

    The shortcode seems to wor (with the default)

    But it is not possible to gove wordpress the params…..

    http://www.to……/it/test01/?name=xxxx ends in an “not found” error

    • trishia February 10, 2014 at 7:07 pm #

      I use this plugin quite a bit- know the comment I’m replying to is very old, but for anyone that comes along and sees this- if you had just removed the ending / right before the ? it would have worked just fine 🙂

      I’ve used this plugin to make a custom newsletter page (displaying different client names based on link) and a few other nifty things for fun- working on a mad libs for kids kind of project now- it is a great tool if you know how to work it and get creative with the applications!!! huge thanks to the author for creating this

  2. jonathan drake April 14, 2012 at 10:32 am #

    would like some documentation on how to use it.

  3. Gary Reeve May 4, 2012 at 5:21 am #

    any documentation as to how this works?

  4. Hi Jonathan May 8, 2012 at 2:22 am #

    Thank you for the plugin it is extremely useful!

    All the best


  5. Adrian November 13, 2012 at 12:15 pm #

    Hello. That’s I great plugin! A good improvement could be a feature to add the keywords into template files and input field from admin.

    Some sort of

    And being able for example to add this :
    [urlparam param="Search, search" default="ASANDIA" /]
    to admin text inputs from settings. I could find it uselful for adwords purpose 🙂

    • Jeremy Shapiro November 18, 2012 at 7:18 pm #

      Adrian, you can totally do that. Google can pass that info to you so you can capture it and submit via hidden fields on your opt-in forms. Check the various utm fields from Google. 🙂

  6. Nic Windley December 3, 2012 at 1:06 am #

    Nice plugin Jeremy. It would be great if we could output some code or even another shortcode based on the condition being met.

  7. DanV April 23, 2013 at 2:37 am #

    Was afraid to try it on the latest 3.5 WordPress but it works perfectly. Very useful thanks 🙂 Now I just have to figure out how to get a contact form plugin to send to an address in the url. Anyone done this ?

  8. LanceG April 24, 2013 at 10:40 am #

    Looks as if this is the plugin I need, but can’t quite get it to work.

    I’m using [urlparam param="Agent" default="NoneXYZ" /]

    and it always comes back as “NoneXYZ”

    I am using the website above plus this string:

    Then I am displaying it on the webpage using just the short code.

    Any suggestions? (I’m new with working on websites.)

  9. Hale Pringle February 22, 2014 at 4:52 pm #


    I don’t know if you are still out there, but it would be great if you would update your plugin in the WordPress site. It has a huge message that it hasn’t been touched in years and we probably shouldn’t use it. It seems to be working find to me.

    You could even create a “paid for” version and some people (myself included) would buy it. I’ll put a link to the post I’m writing right now. It solved a major and basic problem for me – how to tell where a subscriber came from before her or she came to my squeeze page. AWeber has required one page per source and with a dozen ads, and split testing the number of pages gets ridiculous. Passing a parameter in solves that.

    Dr. Hale

  10. Tonioverzeworld March 20, 2014 at 12:25 pm #

    Seems that the plugin doesn’t work with permalink

    please help entering parameter http://mysite.com/mypage/?name=myname

    says me 404 page not found but without parameter it works

  11. Sheriff G April 11, 2014 at 7:17 pm #

    Great plugin I must say.

    But it doesn’t seem to work when I try to add it to Title tag, keyword tag and meta description.

    I’m using the plugin “wordpress seo by Yoast”. When I add your code [urlparam param="city" /] into the title tag section, it turns the code to: [urlparam param="kw" /]

    Is there a fix for that?


  12. Jan May 28, 2014 at 4:41 am #

    Hi Jeremy,

    Thanks for the amazing Plugin! It was exactly what I was looking for. 🙂

    I used it to populate a confirmation page for Gravity Forms with some data from the form.


  13. David July 14, 2014 at 10:27 pm #


    I have a squeeze page to capture email leads.

    Upon form submission, the user is shown a Thank-You page with a meta-refresh tag redirecting to a URL like http://example.com/show.html?a=1234&src=xpto

    how can I dinamically change this meta-refresh to http://example.com/show.html?a=1234&src=urlparam

    being urlparam the query string I passed from my facebook Ad to the squeeze page

    This would be a complete solution to monitor the ROI from affiliates campaing


  14. John August 18, 2014 at 1:26 pm #

    Hey Jeremy, I’ve used your plugin many times before with great success. I’ve run into an issue that I cannot seem to get past. It has to do with passing url param data into an Infusionsoft form using the Survey Funnel plugin. I sent you a message via the contact form on this site with more information.

    I’d love to know if this can be solved.


  1. How to Wordpress GET URL parameter with plugin “URL Params” | MeLoveIM - February 9, 2014

    […] $_GET[]) in WordPress i find many methods isn’t working but i found wordpress plugin “URL Params” it working and easy to use it. You can download here url-params.1.5 or download at […]

Leave a Reply