# Discourse + WordPress embed block

**URL:** <https://meta.discourse.org/t/discourse-wordpress-embed-block/112351>\
**Category:** Feature\
**Tags:** wordpress\
**Created:** [March 22, 2019, 5:38pm UTC](https://meta.discourse.org/t/discourse-wordpress-embed-block/112351 "2019-03-22T17:38:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)\
**Post date:** [March 22, 2019, 5:38pm UTC](https://meta.discourse.org/t/discourse-wordpress-embed-block/112351/1 "2019-03-22T17:38:17Z")

</div>

The new WordPress editor (Gutenberg; now in core) has a variety of default “block” types, and one of these is an embed block. It works similarly to Onebox — paste in a link and it automatically formats an embed.

Currently, unlike with Onebox, it seems to only work with preset [whitelisted sites / link types](https://gogutenberg.com/blocks/embeds/) e.g. YouTube Vimeo, Twitter, Facebook, Instagram, and a couple dozen others.

Rough idea: I’m wondering if it might be possible to add similar functionality for embedded Discourse links in a WP site.

Not sure it’d be possible to extend the core recognized embed types ([defined here](https://github.com/WordPress/gutenberg/tree/master/packages/block-library/src/embed)) to support Discourse, as it looks like these are based on regex domain match and there’s no way to know just from a URL if a site is Discourse.

But maybe this could be incorporated in [WP Discourse](https://github.com/discourse/wp-discourse) — extending the Gutenberg embed functionality to automatically recognize and parse for embed any link from the connected Discourse site.

Basically enabling a sort of “reverse oneboxing” so that any Discourse forum topic pasted in a WP blog post / page would automatically display as a nicely formatted embed.

---

_[View the full topic](https://meta.discourse.org/t/discourse-wordpress-embed-block/112351)._
