This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

qstring-parameter

Description

Sometimes wordpress developers need to pass values through PHP’s GET method. For example, you need to pass your name to another page by GET method like

http://yoursite.com/some-page/?myname=john&age=23

Now you need to retrieve myname and age variables, but wordpress is designed to ignore such things in URL. You get surprised when you don’t seen anything  with

<?php print_r($_GET); ?>

Hence, i decided to make a simple plugin that does this functionality. Qstring is a plugin to allow to access get parameters from query string or URL easily.

FAQ

Usage Examples

<?php

// IMPORT GET PARAMETERS IN ARRAY FORMAT
$myvar = load_qstrings();

// USING PARAMETER WHEREVER NEEDED
echo $myvar['user_id'];

// TO DEBUG, USE PRINT_R
print_r($myvar);
?>

 

Limitations

There are some reserved keywords in wordpress like “name”. These should not be used otherwise wordpress shows “The page you requested could not be found.” OR something similar depending on your theme.

 

Changelog

none, initial version

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Contributors

Browse the code