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
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.
Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.
- Usage Examples
// IMPORT GET PARAMETERS IN ARRAY FORMAT
$myvar = load_qstrings();
// USING PARAMETER WHEREVER NEEDED
// TO DEBUG, USE PRINT_R
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.
Contributors & Developers
“qstring-parameter” is open source software. The following people have contributed to this plugin.Contributors
none, initial version