[wp-hackers] Load page instead of including it

NewKind newkind at gmail.com
Fri Sep 2 10:13:04 UTC 2011


I was wondering if theres something like load_template that would replace the whole content instead of just including the provided file.

I'm trying to redirect user (on a certain conditions) to a custom php file located in the theme directory. The issue is that to do that the WP way,
i need to use require_once and point it from the theme directory to the wp directory. The require_once('../../../wp-blog-header.php'); doesn't work,
and since WP isn't initialized - I don't have access to such constants like ABSPATH.

Maybe one of you knows a better way to do this …


More information about the wp-hackers mailing list