[wp-hackers] Access $post near template_include

Mario Peshev mario at peshev.net
Sun Jul 22 12:21:09 UTC 2012


Hello,

I'm trying to do some on-the-fly manipulations on the page template that
take place in template-loader.php, by filtering the template_include part
at the end. However I am not sure how to get the post ID there as I still
don't have an access to the global variables for post and the loop and I
also can't get it from the server variable due to permalink specifics.

Is there a workaround to get the post ID at that point of loading?


Mario Peshev
Training and Consulting Services @ DevriX
http://www.linkedin.com/in/mpeshev
http://devrix.com
http://peshev.net/blog


More information about the wp-hackers mailing list