[wp-hackers] Reinvoke wordpress

Dobri dyordan1 at ramapo.edu
Wed May 8 16:18:01 UTC 2013

Hey guys,

I know this might be a weird question but I've got a weird client:

I have a multi-site installation. When a non-existing site slug is encountered, I reach the 404.php page and just before saying "nope, doesn't exist", I do some checks. If they work out, I would like to display some content from another site the same way it would have been displayed by wordpress if requested properly, going through all the templates and post_types and all of that fun stuff. So far, I have managed to detect if everything checks out and use switch_to_blog() to switch to the appropriate blog. Is it possible to reach my end goal with this? In essence, when I reach the 404 and I check and everything is in order, I want to reinvoke WordPress, just with a different request on a different site. Redirecting doesn't work since there is a mix of static files and wordpress sites and redirecting would link to the static files (precisely the reason I'm doing this). So… ideas?


More information about the wp-hackers mailing list