• Hi, my client has a self-hosted WordPress site AND a WordPress.com blog. Is there a way to post his new posts from WordPress.com onto his self-hosted website, like in a widget in the sidebar, etc?

    I searched online and on WP.org for a plugin but could not find anything. Unless I’m not using the right terms?

    Thank you in advance!

    Andre

    • This topic was modified 1 month, 2 weeks ago by styzer.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I don’t know much about wp.com beyond it being somewhat based on the same software as wp.org. I assume there’s a REST API just like we have in self-hosted. That would be one way to get data. Another is the oEmbed process. If you enter a post permalink into post content on its own line, the oEmbed process will fetch the related data and present it as a link card.

    Widget content might not process oEmbed like it does in post content. The oEmbed card can be fetched with wp_oembed_get() if it does not happen automatically. The problem with using oEmbed is you’d need the permalink of the latest post. The API is much better for getting latest post content. The drawback is it comes back as JSON data. You’ll need code to parse the data in order to output it in a presentable manner.

    Another issue is the self-hosted site doesn’t know when a new blog post is published. It’s very inefficient to repeatedly query the API or oEmbed, only to get the same post over and over. It’d be better if the .com site could somehow notify self-hosted that a new post has been published. A sort of push notification if you will (more accurately a webhook). I don’t know if any of these features are available over at wp.com. I suggest asking through .com’s support if any of the above approaches are possible.

    On the self-hosted end, nearly anything is possible, though it might require custom coding. Things are more limited on the .com end. Find out what’s feasible at .com before worrying about what self-hosted can do.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.