I need a plugin for wordpress that would allow me to
execute php code before the headers get sent.
This php code must be different for each post.
I write a first post called "post 1" and I decide that when
someone reads this post and only when someone reads this post, then a piece of php code associated to this post must be executed BEFORE the headers are sent. It's important because I want to set cookies, so the php code must be
executed before the headers are sent.
Then if I write a 2nd post called "post 2", I want to execute another piece of php code in the headers and of course NOT execute the code associated with "post 1"
And so on...