<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Passing Query String Parameters in WordPress URL</title>
	<atom:link href="http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/</link>
	<description></description>
	<lastBuildDate>Thu, 19 Jan 2012 17:05:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: adrian</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-573</link>
		<dc:creator>adrian</dc:creator>
		<pubDate>Sat, 17 Sep 2011 21:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-573</guid>
		<description>Good tutorial on an interesting yet not well documented feature of WP.

Does this method rewrite any URL present in the output (page, post, etc), or only ones internal to a site (permalinks).

For example, if one edited a post to include a URL would that also be a potential candidate for a rewrite, assuming it also matched the grep string.

Perhaps another way of posing the question: Does this run on a near-completed page, or as part of the page assembly?

Thanks.


 So, we need to tell WordPress that **anytime it finds a URL matching that structure**,  to use the last portion, the category-name, to populate our new “msds_pif_cat” query variable. T


This rule tells WordPress that **anytime it finds a URL** that includes “msds-pif/”, followed by anything other than a forward slash, followed by another (optional) forward slash, to capture the last portion of that URL (the part within the parenthesis), and serve the page found at “index.php?pagename=msds-pif&amp;msds_pif_cat=$matches[1]“.</description>
		<content:encoded><![CDATA[<p>Good tutorial on an interesting yet not well documented feature of WP.</p>
<p>Does this method rewrite any URL present in the output (page, post, etc), or only ones internal to a site (permalinks).</p>
<p>For example, if one edited a post to include a URL would that also be a potential candidate for a rewrite, assuming it also matched the grep string.</p>
<p>Perhaps another way of posing the question: Does this run on a near-completed page, or as part of the page assembly?</p>
<p>Thanks.</p>
<p> So, we need to tell WordPress that **anytime it finds a URL matching that structure**,  to use the last portion, the category-name, to populate our new “msds_pif_cat” query variable. T</p>
<p>This rule tells WordPress that **anytime it finds a URL** that includes “msds-pif/”, followed by anything other than a forward slash, followed by another (optional) forward slash, to capture the last portion of that URL (the part within the parenthesis), and serve the page found at “index.php?pagename=msds-pif&amp;msds_pif_cat=$matches[1]“.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-572</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 13 May 2011 14:41:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-572</guid>
		<description>- Does this influence the current permalink / pagination behaviour of wordpress?
- Is it possible to have more than one level with this teqnique? (e.g. http://myblog.com/level1/level2/level3/level4 and catch all the &quot;variables&quot; level2, level3, level4?

thanks for your answers.</description>
		<content:encoded><![CDATA[<p>- Does this influence the current permalink / pagination behaviour of wordpress?<br />
- Is it possible to have more than one level with this teqnique? (e.g. <a href="http://myblog.com/level1/level2/level3/level4" rel="nofollow">http://myblog.com/level1/level2/level3/level4</a> and catch all the &#8220;variables&#8221; level2, level3, level4?</p>
<p>thanks for your answers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Crenshaw</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-571</link>
		<dc:creator>John Crenshaw</dc:creator>
		<pubDate>Fri, 18 Feb 2011 00:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-571</guid>
		<description>I&#039;ve never had to rewrite paginated urls before, so I couldn&#039;t help you on this one. Sorry!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve never had to rewrite paginated urls before, so I couldn&#8217;t help you on this one. Sorry!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sean</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-570</link>
		<dc:creator>sean</dc:creator>
		<pubDate>Sun, 13 Feb 2011 22:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-570</guid>
		<description>I am having issues with using this and pagination together.

I have created a rewrite rule based on your code to convert http://207.126.50.142/category/exhibitions/ into a url with variables for past, current, future like so http://207.126.50.142/shows/current/

Problem shows up on the category template i am loading, there are pagination links for each array of exhibition posts, which on load of the resulting /shows/past/page/2 gives 404.  If I call up the default wp url for this (/category/exhibitions/page/2) it works.  Is there some workaround in defining the new rule which can read the paged variable through the wp default rewrite of that paged variable?</description>
		<content:encoded><![CDATA[<p>I am having issues with using this and pagination together.</p>
<p>I have created a rewrite rule based on your code to convert <a href="http://207.126.50.142/category/exhibitions/" rel="nofollow">http://207.126.50.142/category/exhibitions/</a> into a url with variables for past, current, future like so <a href="http://207.126.50.142/shows/current/" rel="nofollow">http://207.126.50.142/shows/current/</a></p>
<p>Problem shows up on the category template i am loading, there are pagination links for each array of exhibition posts, which on load of the resulting /shows/past/page/2 gives 404.  If I call up the default wp url for this (/category/exhibitions/page/2) it works.  Is there some workaround in defining the new rule which can read the paged variable through the wp default rewrite of that paged variable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vikrant</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-569</link>
		<dc:creator>Vikrant</dc:creator>
		<pubDate>Mon, 20 Dec 2010 10:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-569</guid>
		<description>Hi everyone,

I am working on a project where i have a similar situation. I have successfully managed to create the first and individual pages for each actor.

I have created a custom post type movies and have a page named page-movies.php which shows the list of all movies.

Similarly, I have created a taxonomy Actors and have a page actors.php where i have the list of all the actors and a page taxonomy-actors.php which shows the details for the individual actor.

I access my movies page by mysite.com/movies/ and it shows me the list of movies. When i click on a movie name it opens a page mysite.com/movies/movie-name/ with the description of the movie and the list of actors that acted in it. Whenever i click on any actor name the url is changed to mysite.com/actors/actor-name/ and the page shows the actors details and the list of movies that he has acted in.

Everything fine till here. 
Now i have a page filmography.php which shows only the list of movies that the particular actor has acted in but the problem is i cannot make it to appenf to the url.

What i would like to do is the filmography.php page be rendered when i type mysite.com/actors/actor-name/filmography or mysite.com/actors/actor-name/?filmography.php. Currently when i type the above url directly i get the page not found error. Also if anyone can tell me how do i create a link for filmography.php on the actor details page so that when i click on that link i am directed to mysite.com/actors/actor-name/filmography or mysite.com/actors/actor-name/?filmography.php with the desired result.

Can anyone help.

I am a complete novice in php and i tried whatever is explained above but failed. May be i am missing out on soemthing.

Hoping for a quick response. ITS URGENT.

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi everyone,</p>
<p>I am working on a project where i have a similar situation. I have successfully managed to create the first and individual pages for each actor.</p>
<p>I have created a custom post type movies and have a page named page-movies.php which shows the list of all movies.</p>
<p>Similarly, I have created a taxonomy Actors and have a page actors.php where i have the list of all the actors and a page taxonomy-actors.php which shows the details for the individual actor.</p>
<p>I access my movies page by mysite.com/movies/ and it shows me the list of movies. When i click on a movie name it opens a page mysite.com/movies/movie-name/ with the description of the movie and the list of actors that acted in it. Whenever i click on any actor name the url is changed to mysite.com/actors/actor-name/ and the page shows the actors details and the list of movies that he has acted in.</p>
<p>Everything fine till here.<br />
Now i have a page filmography.php which shows only the list of movies that the particular actor has acted in but the problem is i cannot make it to appenf to the url.</p>
<p>What i would like to do is the filmography.php page be rendered when i type mysite.com/actors/actor-name/filmography or mysite.com/actors/actor-name/?filmography.php. Currently when i type the above url directly i get the page not found error. Also if anyone can tell me how do i create a link for filmography.php on the actor details page so that when i click on that link i am directed to mysite.com/actors/actor-name/filmography or mysite.com/actors/actor-name/?filmography.php with the desired result.</p>
<p>Can anyone help.</p>
<p>I am a complete novice in php and i tried whatever is explained above but failed. May be i am missing out on soemthing.</p>
<p>Hoping for a quick response. ITS URGENT.</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Crenshaw</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-568</link>
		<dc:creator>John Crenshaw</dc:creator>
		<pubDate>Fri, 03 Dec 2010 14:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-568</guid>
		<description>Glad I could help!</description>
		<content:encoded><![CDATA[<p>Glad I could help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-567</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Sat, 27 Nov 2010 01:13:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-567</guid>
		<description>Thanks for showing me this, John. You saved my life. I thought that circumventing WP&#039;s URL structure could only be done by putting the rules in .htaccess myself.</description>
		<content:encoded><![CDATA[<p>Thanks for showing me this, John. You saved my life. I thought that circumventing WP&#8217;s URL structure could only be done by putting the rules in .htaccess myself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Crenshaw</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-566</link>
		<dc:creator>John Crenshaw</dc:creator>
		<pubDate>Mon, 15 Nov 2010 18:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-566</guid>
		<description>Haha! Excellent.</description>
		<content:encoded><![CDATA[<p>Haha! Excellent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-565</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 15 Nov 2010 18:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-565</guid>
		<description>Dude, thanks a lot... I replaced &quot;pagename&quot; with &quot;name&quot; and it works beautifully.

I owe you one.</description>
		<content:encoded><![CDATA[<p>Dude, thanks a lot&#8230; I replaced &#8220;pagename&#8221; with &#8220;name&#8221; and it works beautifully.</p>
<p>I owe you one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Crenshaw</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-564</link>
		<dc:creator>John Crenshaw</dc:creator>
		<pubDate>Mon, 15 Nov 2010 14:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-564</guid>
		<description>Yes, you&#039;ll need to add another parameter to handle pagination.</description>
		<content:encoded><![CDATA[<p>Yes, you&#8217;ll need to add another parameter to handle pagination.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Crenshaw</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-563</link>
		<dc:creator>John Crenshaw</dc:creator>
		<pubDate>Mon, 15 Nov 2010 14:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-563</guid>
		<description>I&#039;m not sure about that Dan, I&#039;ve never had to do this for posts. I believe &quot;pagename&quot; is one of the many parameters available for the query_posts function. You may want to look at that function and see if you can use another parameter, like the post&#039;s ID.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure about that Dan, I&#8217;ve never had to do this for posts. I believe &#8220;pagename&#8221; is one of the many parameters available for the query_posts function. You may want to look at that function and see if you can use another parameter, like the post&#8217;s ID.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-562</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 15 Nov 2010 11:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-562</guid>
		<description>Hi John, great post, almost exactly what I need, do you know any way to make this work with posts.

I mean I am sending a var to a post, using your tehnique I ad a rule, like this:
$aNewRules = array(&#039;([^/]+)/([^/]+)/?$&#039; =&gt; &#039;index.php?pagename=$matches[1]&amp;c=$matches[2]&#039;);

If ?pagename is the name of a page it works brilliant, if however it is the name of post, I get redirected to:

site.tld/post-name/ or whatever permalink structure I set, like site.tld/2010/11/15/post-name/

and the query value is lost. Maybe you know some way around this.

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi John, great post, almost exactly what I need, do you know any way to make this work with posts.</p>
<p>I mean I am sending a var to a post, using your tehnique I ad a rule, like this:<br />
$aNewRules = array(&#8216;([^/]+)/([^/]+)/?$&#8217; =&gt; &#8216;index.php?pagename=$matches[1]&amp;c=$matches[2]&#8216;);</p>
<p>If ?pagename is the name of a page it works brilliant, if however it is the name of post, I get redirected to:</p>
<p>site.tld/post-name/ or whatever permalink structure I set, like site.tld/2010/11/15/post-name/</p>
<p>and the query value is lost. Maybe you know some way around this.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruno</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-561</link>
		<dc:creator>Bruno</dc:creator>
		<pubDate>Sun, 07 Nov 2010 15:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-561</guid>
		<description>Exactly what i was looking for. Thanks a lot for posting this, John! Cheers.</description>
		<content:encoded><![CDATA[<p>Exactly what i was looking for. Thanks a lot for posting this, John! Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-560</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 28 Oct 2010 23:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-560</guid>
		<description>Are there any simple plugins that do this stuff?

I have a simple need that maybe someone here can help me address. I need to take a URL like this:

mydomain.com/product/prod123

and make it behave like this:

mydomain.com/product?prodnum=prod123

Then on the page mydomain.com/product I need to be able to use the value $prodnum (=prod123) in a few places within the content of the page. For example, if there were a form there to allow someone to ask a question about the product, it could have a hidden field with $prodnum (or however it’s given) so it shows up as “prod123″.

Also there could be a query that uses $prodnum to pull up information about that product and display it on the page.

I don’t want to have a custom template page, just any regular page.

There are several plugins that help manage taxonomies, but I can&#039;t figure out how to make any of them do just this.  I don&#039;t need the taxa added to a database; I don&#039;t need tag clouds; I don&#039;t need fancy ways to build associations.  I just need to pick off a value from the URL and make it available as a parameter inside a page.

Basically, I need to pass out stuff with URLs on it that people will type in, and I don&#039;t want to have the &quot;?prodid=&quot; part.  Peole will find a dozen reasons to screw up anything they can, and basically this data is implied anyway.

Many thanks in advance!
-David</description>
		<content:encoded><![CDATA[<p>Are there any simple plugins that do this stuff?</p>
<p>I have a simple need that maybe someone here can help me address. I need to take a URL like this:</p>
<p>mydomain.com/product/prod123</p>
<p>and make it behave like this:</p>
<p>mydomain.com/product?prodnum=prod123</p>
<p>Then on the page mydomain.com/product I need to be able to use the value $prodnum (=prod123) in a few places within the content of the page. For example, if there were a form there to allow someone to ask a question about the product, it could have a hidden field with $prodnum (or however it’s given) so it shows up as “prod123″.</p>
<p>Also there could be a query that uses $prodnum to pull up information about that product and display it on the page.</p>
<p>I don’t want to have a custom template page, just any regular page.</p>
<p>There are several plugins that help manage taxonomies, but I can&#8217;t figure out how to make any of them do just this.  I don&#8217;t need the taxa added to a database; I don&#8217;t need tag clouds; I don&#8217;t need fancy ways to build associations.  I just need to pick off a value from the URL and make it available as a parameter inside a page.</p>
<p>Basically, I need to pass out stuff with URLs on it that people will type in, and I don&#8217;t want to have the &#8220;?prodid=&#8221; part.  Peole will find a dozen reasons to screw up anything they can, and basically this data is implied anyway.</p>
<p>Many thanks in advance!<br />
-David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lita</title>
		<link>http://www.rlmseo.com/blog/passing-get-query-string-parameters-in-wordpress-url/#comment-559</link>
		<dc:creator>Lita</dc:creator>
		<pubDate>Tue, 17 Aug 2010 12:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=845#comment-559</guid>
		<description>Thanks for sharing these helpful tips. I have it work fine with 3.0. I&#039;m stuck on one thing though. How do I get it to work with pagination (mysite.com/my-page/my-cat/page/2/). Do I have to add more rules and query  variables?

Thanks.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing these helpful tips. I have it work fine with 3.0. I&#8217;m stuck on one thing though. How do I get it to work with pagination (mysite.com/my-page/my-cat/page/2/). Do I have to add more rules and query  variables?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

