diff --git a/app/PccSyncManager.php b/app/PccSyncManager.php index 4d917c1..9a1a2df 100644 --- a/app/PccSyncManager.php +++ b/app/PccSyncManager.php @@ -125,6 +125,11 @@ private function createOrUpdatePost($postId, Article $article, bool $isDraft = f $data['post_excerpt'] = $article->metadata['description']; } + // Set post title if available. + if (isset($article->metadata['title']) && $article->metadata['title']) { + $data['post_title'] = $article->metadata['title']; + } + if (!$postId) { $postId = wp_insert_post($data); update_post_meta($postId, PCC_CONTENT_META_KEY, $article->id);