Steps
- Add the snippet to your theme's functions.php or a small plugin
- Set your Jhajha API key
- Publish a WordPress post — it is sent to Blogger
Example (php)
add_action('publish_post', function ($id) {
$p = get_post($id);
wp_remote_post("https://blogjh.lovable.app/api/public/v1/posts", [
'headers' => ['Authorization' => 'Bearer bpk_live_YOUR_KEY', 'Content-Type' => 'application/json'],
'body' => json_encode(['title' => $p->post_title,
'html' => wp_trim_words($p->post_content, 80) . ' <a href="' . get_permalink($id) . '">Read more</a>',
'is_draft' => false]),
]);
});FAQ
Will this cause duplicate content?
Posting a summary with a link back is safer than copying the full article.
