Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I may be going down the wrong path here so please let me know if there is a better way of accomplishing this.

I'm building an ecom on the side of wordpress and want to dynamicaly parse the url when the uri begins with /category/ and /product/. For whenever there is a url match i want to load 2 seperate templates.

As a test, I copied the wp object of a valid request "/sample-page/" and in is_404() (the first function I came accross that deals with the templates I replaced the wp object built with the previous valid object wich will obviously load the same page no matter what is in the url.

My question being, After I have used the main wp object to analys whether or not I need to load the cat/prod template can I rebuild the wp object to include valid results for a specifict wordpress page, i.e. 'ecomcategories page' or p=12

share|improve this question

closed as too localized by toscho Jul 12 '12 at 22:48

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

Jesus, exact answer in wp manual - http://codex.wordpress.org/Class_Reference/WP_Rewrite 3/4 down

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.