URL Params

URL Params

Wordpress plugin

Install on Wordpress

App Details

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 parameter, 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" /]. Note that PHP only returns dates formatted in English regardless of locale settings.

This is great if you have personalized links, like from Infusionsoft or Keap, 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.

Usage

Use the shortcode urlparam with the optional parameter of “default”. For example [urlparam param="FirstName" /] or [urlparam param="FirstName" default="Friend"/].

For conditional content use [ifurlparam][/ifurlparam]. For example, [ifurlparam param="FirstName"]Hey, I know you, [urlparam param="FirstName"]![/ifurlparam] would greet known visitors, but display nothing to users without a FirstName in the query string.

If you want to show content when a value does NOT exist, you can set empty in [ifurlparam]. For example [ifurlparam param="FirstName" empty="1"]Welcome to the site, visitor![/ifurlparam] would greet visitors without a FirstName in the query string, but display nothing for visitors with FirstName in the query string.

If you want to show content only to visitors with a specific value in their query string, you can set is in [ifurlparam]. For example, [ifurlparam param="FirstName" is="Bob"]Hi, Bob![/ifurlparam], would only greet visitors with the FirstName param set to Bob.

If you want to have urlparam return an HTML attribute, for example to use in pre-setting the value of input or hidden input fields, pass in the optional attr parameter. You might set a value attribute for an input field like so: <input type="text" name="firstname" [urlparam attr="value" param='FirstName']> or you might set a src attribute for an image tag like so: <img [urlparam attr="src" param='imgurl']>

If you want urlparam to return an entire HTML tag, for example in creating an input field, pass in the optional htmltag parameter. For example, [urlparam htmltag="input" type="text" name="firstname" id="first" attr="value" param="FirstName" default="Bob" /] will produce something like <input type="text" name="firstname" id="first" value="Bob" />

Security

To help protect your site against Reflected Cross Site Scripting, we sanitize output with esc_html() which prevents any HTML tags from being passed in and displayed. This would prevent someone from passing in javascript, for example, and having it execute on your site.

Starting in the WordPress 4.2.3 security auto-update, you can no longer include shortcodes in HTML attributes. Previous to this WordPress update, you could set a field value like this: <input type="text" name="firstname" value="[urlparam param='FirstName']">. Now you have to set it like this: <input type="text" name="firstname" [urlparam attr="value" param='FirstName']> or [urlparam htmltag="input" type="text" name="firstname" attr="value" param="FirstName" /]. If you are still using this shortcode the old way, unfortunately, WordPress simply won’t process the shortcode and will return the full shortcode text unprocessed.

To prevent unprivileged users (like Contributors) from using this shortcode to have privileged users (like Admins) accidentally execute arbitrary javascript via HTML attributes (like onclick, onmouseover, etc), html tags and attributes are sanitized.

If you do need have a need to set certain sanitized tags or attributes, at your own risk, you can manually allow these from the URL Params options page under Settings.

Pricing

Starting from $0 per month.

Check Out the FAQ Widget

By Common Ninja

FAQTry For Free!

App Info

Rating

Reviewers

35 reviews

Tags

query string
url
url parameters
url params
urlparam

Developed By

Jeremy B. Shapiro

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

FAQ for Wordpress logo

FAQ

Add an FAQ section to your site to answer common questions, reduce support requests, and give visitors a smoother and more confident user experience.

Events Calendar for Wordpress logo

Events Calendar

Add an events calendar to your site so visitors can view upcoming activities, improving engagement and event visibility.

TDEE Calculator for Wordpress logo

TDEE Calculator

Create custom calculators that let visitors enter values, get results, and make confident choices that support your business.

Vimeo Carousel for Wordpress logo

Vimeo Carousel

Show Vimeo videos with a Vimeo carousel that displays clips in a smooth, flexible layout to boost visibility and engagement.

Job Listings for Wordpress logo

Job Listings

Create job listings with a jobs board widget that lets you post openings, manage roles easily, and help candidates find the right positions quickly.

Call Button for Wordpress logo

Call Button

Add a call button to your site so visitors can tap to start a phone call instantly, improving direct communication access.

Vimeo Slider for Wordpress logo

Vimeo Slider

Show Vimeo videos with a Vimeo slider that displays clips in a smooth slider to boost engagement and keep visitors watching.

March Madness Bracket Maker for Wordpress logo

March Madness Bracket Maker

Create interactive March Madness brackets where users can make predictions, track tournament progress, and compete with others throughout every round.

Image Wall for Wordpress logo

Image Wall

Showcase visuals with an image wall that creates a parallax style gallery, offers smooth scrolling, and presents images in customizable, engaging layouts.

WhatsApp Chat for Wordpress logo

WhatsApp Chat

Add WhatsApp Chat to your site to communicate with visitors, deliver instant support, and create a smoother, more trustworthy user experience.

Count-Up Clock for Wordpress logo

Count-Up Clock

Track time since important events with a count up clock that displays elapsed days and hours and keeps visitors engaged.

Pricing Tables for Wordpress logo

Pricing Tables

Add pricing tables to your site to present plans clearly, help visitors compare features, and guide them toward faster and more confident conversions.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms