I am developing cron to post html data from wordpress to ghost but in ghost content post blank and response it show , can you please help me with this , here is my code and let me know what I am doing wrong.
$escaped_content = $post->post_content;
$mobiledoc = array(
'version' => '0.3.1',
'atoms' => array(),
'cards' => array(
array(
'html',
array(
'html' => $escaped_content
)
)
),
'markups' => array(),
'sections' => array(
array(
1, // Section type identifier for 'html' section
'p',
array(
array(0, array(), 0, '')
)
)
)
);
// Encode the mobiledoc array as a JSON string
$mobiledoc_json = json_encode($mobiledoc, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);