I found that this can be done simply by using WordPress’ Page editor. Nothing else is needed:
- Compose the content in WordPress’ Page editor
- Save (but don’t publish)
- In your code, retrieve the saved content
$id=47; $post = get_post($id); $content = apply_filters('the_content', $post->post_content); echo $content;
$title="page title"; $page = get_page_by_title( $title ); $content = apply_filters('the_content', $page->post_content); echo $content;
Note that apply_filters is used in case there is a plugin somewhere that wants to “apply filters” to the_content – it’s good for forwards compatibility.