Home / functions.php / Get entire post in variable
  • How to Get entire post in variable

    no thumbnail sorry: Get entire post in variable

    Adding this PHP code to your functions.php file of your wordpress theme will place a entire page into a PHP variable.

    ( click code to copy )

    wordpress snippet : PHP

    function callback($buffer) {
    	// modify buffer here, and then return the updated code
    	return $buffer;
    function buffer_start() {
    function buffer_end() {
    add_action('wp_head', 'buffer_start');
    add_action('wp_footer', 'buffer_end');

    ( WordPress codex functions, hooks, in this snippet. )

    wp_footer, wp_head, add_action, _e, wp,