# Onebox doesn't work for WordPress

**URL:** https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618
**Category:** Support
**Created:** [January 30, 2017, 7:40pm UTC](https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618 "2017-01-30T19:40:29Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![BCHK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bchk/32/3268_2.png) [@BCHK](https://meta.discourse.org/u/BCHK)
#### Post date: [January 30, 2017, 7:40pm UTC](https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618/1 "2017-01-30T19:40:29Z")

</div>

Hi Guys,

I still have a problem with another plugin/gem. My main website is based on wordpress - but a long time ago I set up the posts to have the URL format like this:

[http://schizophrenia.com/?p=793](http://schizophrenia.com/?p=793)

Is there anyway that I can get my discourse forum to onebox these URLs?

Thanks,

Brian

[https://github.com/discourse/onebox](https://github.com/discourse/onebox)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [January 30, 2017, 9:15pm UTC](https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618/2 "2017-01-30T21:15:42Z")

</div>

> [@BCHK](#):
>
> Is there anyway that I can get my discourse forum to onebox these URLs?

You need to properly implement either [OpenGraph](http://ogp.me/) or [oEmbed](http://oembed.com/).

---

<div class="post-metadata">

### Author: ![BCHK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bchk/32/3268_2.png) [@BCHK](https://meta.discourse.org/u/BCHK)
#### Post date: [January 30, 2017, 10:37pm UTC](https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618/3 "2017-01-30T22:37:41Z")

</div>

Are you saying the Wordpress only implements opengraph or oEmbed with one form of URL? It works fine with URLs that include the title name, but not the URL format I have - why would that be?

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [January 30, 2017, 11:12pm UTC](https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618/4 "2017-01-30T23:12:25Z")

</div>

Do you have an example URL that does embed properly, preferably a working version of that same page, for comparison? It looks like Wordpress is _trying_ to use OpenGraph, but the OG spec says:

> The four required properties for every page are: `og:title` […] `og:type` […] `og:image` […] `og:url`

The only one that page is displaying for me is `og:image`, which is why we’re not oneboxing that URL properly. If Wordpress is presenting all the OG meta tags on one version of the page, but not on another, that would be… weird, but something you’d have to take up with Wordpress.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 30, 2017, 11:34pm UTC](https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618/5 "2017-01-30T23:34:42Z")

</div>

I am not a WordPress expert.

> [@BCHK](#):
>
> It works fine with URLs that include the title name, but not the URL format I have - why would that be?

Because either oEmbed or Discourse won’t read past the `?`.

I’m pretty sure that if you turn on any permalinks other than “plain” your problem will be solved. It won’t hurt anything because the old `?p=xxx` links will continue to work (but remember I’m not an expert, so you should check this after you turn on permalinks).

See [http://schizophrenia.com/wp-admin/options-permalink.php](http://schizophrenia.com/wp-admin/options-permalink.php)

> [@mpalmer](#):
>
> Do you have an example URL that does embed properly, preferably a working version of that same page, for comparison?

Here’s one from my site:

[https://www.literatecomputing.com/product/wordpress-discourse-together/](https://www.literatecomputing.com/product/wordpress-discourse-together/)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [January 31, 2017, 12:20am UTC](https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618/6 "2017-01-31T00:20:01Z")

</div>

WordPress oneboxes will work using the plain (post number) permalink structure. I think the issue you’re having is the lack of OpenGraph tags on the page. An easy way to get OpenGraph tags on your site is to install the Yoast SEO plugin. Here’s an example that uses the post-number permalink structure - first with the Yoast SEO plugin enabled, and then a similar post, but with Yoast SEO disabled.

 ![](https://global.discourse-cdn.com/meta/original/3X/f/a/fa5da95b1031079236e038fb00a15e94b9b435a5.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [August 8, 2022, 12:26pm UTC](https://meta.discourse.org/t/onebox-doesnt-work-for-wordpress/56618/9 "2022-08-08T12:26:07Z")

</div>


