Get the whole page content and display in the header

Viewed 250

Created a page and want to display all the content on the header.php, but it does not display anything.

code below:

$page = get_page_by_title( 'TEST' );
$content = apply_filters('the_content', $page->post_content);
echo $content;

Is there another way to do it?

2 Answers
Related