Displays the full title and content of a specific WordPress page by its page title, using WordPress’s native filters to preserve the page’s formatting and generated content.

$title = 'My Page Title';
$page = get_page_by_title($title);
$title = apply_filters('the_title', $page->post_title);
$content = apply_filters('the_content', $page->post_content);
if($page) {
echo $title;
echo $content;
}

»
«