[wp-hackers] Ignore Portions of URI

Kaz kazeneko at gmail.com
Mon Jan 12 07:39:10 GMT 2009


Hello,

I'm hoping someone on this mailing list can help.

I need to run custom PHP code inside of WordPress generated posts and pages
with an odd requirement. I need WordPress to ignore portions of the URI in
order for WordPress not to load a 404 error, and for my script to be able to
read its variables.

Here's 2 examples:
 <http://domainname.com/category/categoryname/title-of-the-post/123/2/5>
http://domainname.com/category/categoryname/post-title/123/2/5<http://domainname.com/category/categoryname/title-of-the-post/123/2/5>

<http://domainname.com/category/categoryname/title-of-the-post/123/2/5>
http://domainname.com/pagename/123/2/5<http://domainname.com/category/categoryname/title-of-the-post/123/2/5>
Where /123/4/5 are the variables.

So, WordPress would need to ignore everything after "post-title" and
"pagename". I can't find an existing plug-in, nor have I had any luck while
going through WordPress' website.  If it helps any, WordPress' permalinks
are set to: /%category%/%postname%/.

All help will be greatly appreciated!
-- 
-Kaz


More information about the wp-hackers mailing list