WordPress.org

Ready to get started?Download WordPress

Forums

Get Page ID before Headers are Sent? (1 post)

  1. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by George Stephanis
  • This topic is not resolved
  • WordPress version: 3.0.4