WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Hook to get whole WordPress HTML document? (4 posts)

  1. pedjas
    Member
    Posted 5 years ago #

    I need to create plugin that should get whoe HTML code of the WordPress generated page, just before it is sent to user browser, to be able to parse it and change some contents if neccessary.

    I cannot find apropriate hook. Is there such one?

  2. Dagon Design
    Member
    Posted 5 years ago #

    There is not one. If I remember correctly, there is still a way to do it though - just not with the built-in hooks. I am trying to find it again.

  3. Dagon Design
    Member
    Posted 5 years ago #

    I just wrote up some instructions for you. Perhaps they will help others as well.

    It explains how to use the output buffering feature of PHP to create a virtual hook that covers everything from the end of the HEAD section of the html, to the footer section of the theme.

    http://www.dagondesign.com/articles/wordpress-hook-for-entire-page-using-output-buffering/

  4. pedjas
    Member
    Posted 5 years ago #

    Thanks, it works.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.