• Anyone know a way to snag the ID of the current Page/Post before headers are actually sent?

    I’m doing some stuff where I need to session_start() for a certain page on the front-end, but at the point at which you can find out the ID from wordpress functions and globals, headers are already sent so it’s too late. Is there a function to snag it on init() or the like? I’ve seen several inquiries to this end via googling, but haven’t found any actual answers.

  • The topic ‘Get Page ID before Headers are Sent?’ is closed to new replies.