# Showing Discourse notifications in WordPress?

**URL:** https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697
**Category:** WordPress
**Created:** [May 23, 2016, 8:05pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697 "2016-05-23T20:05:39Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![lkramer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lkramer/32/83897_2.png) [@lkramer](https://meta.discourse.org/u/lkramer)
#### Post date: [May 23, 2016, 8:05pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/1 "2016-05-23T20:05:40Z")

</div>

Hello! We’re considering the advised setup of WordPress installed on [domain.com](http://domain.com) and discourse installed on [community.domain.com](http://community.domain.com) and then using the WordPress plugin provided by Discourse for single sign on etc.

Obviously if someone is on [community.domain.com](http://community.domain.com) they have a “notification” (like someone replied to a thread or what have you) the user will see that notification at the top of the screen.

But what about getting that notification to show up in WordPress? Is this functionality possible? Is it built in to the WordPress plugin already?

We envision our users will spend time on the main domain [domain.com](http://domain.com) reading articles and so forth and we would like them to see any notifications they come up for forum threads they are involved in etc.

Thanks if anyone can clarify.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 23, 2016, 11:15pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/2 "2016-05-23T23:15:11Z")

</div>

> [@lkramer](#):
>
> But what about getting that notification to show up in WordPress? Is this functionality possible? Is it built in to the WordPress plugin already?

It’s a good idea, this has come up before – how do we surface Discourse notifications in the “parent” site – but we’ve never had a big customer seriously interested in pushing it forward, so we haven’t had the resources to work on it.

I do think this would be possible through the existing Discourse API; you could use the API call to poll for notifications for the currently logged in user, and then show them however you like on the parent website.

---

<div class="post-metadata">

### Author: ![lkramer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lkramer/32/83897_2.png) [@lkramer](https://meta.discourse.org/u/lkramer)
#### Post date: [May 24, 2016, 1:36pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/3 "2016-05-24T13:36:49Z")

</div>

OK cool. Maybe we’ll play with it and see if we can get this working as a part of our decision to use discourse or not. Thanks for the response!

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [May 25, 2016, 7:49pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/4 "2016-05-25T19:49:40Z")

</div>

Pretty sure I’ve seen this in action over at FeverBee, am I right about that @HAWK? If so, maybe you could shed some light on how you’ve got this set up on your end?

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [May 25, 2016, 9:16pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/5 "2016-05-25T21:16:07Z")

</div>

Correct, we do have this implemented. I don’t know how it was done because I outsourced it, but my developers took advice from @riking so he might be the best person to answer this.

If not, I’m happy to send them an email and find out what was involved.

---

<div class="post-metadata">

### Author: ![runofthemill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/runofthemill/32/56919_2.png) [@runofthemill](https://meta.discourse.org/u/runofthemill)
#### Post date: [May 25, 2016, 11:43pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/6 "2016-05-25T23:43:46Z")

</div>

@HAWK that would be great if you don’t mind - I’m also looking into a similar setup as @lkramer

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [May 26, 2016, 12:04am UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/7 "2016-05-26T00:04:39Z")

</div>

Sure, I’ll see what I can find out. Might take a couple of days as they’re offshore.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [May 26, 2016, 3:33am UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/8 "2016-05-26T03:33:36Z")

</div>

You need to set the cors origins site setting, and turn on `DISCOURSE_ENABLE_CORS` if you’re self-hosted. After that, it should be easy to request `/notifications.json?silent=1`.

---

<div class="post-metadata">

### Author: ![lkramer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lkramer/32/83897_2.png) [@lkramer](https://meta.discourse.org/u/lkramer)
#### Post date: [May 26, 2016, 2:32pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/9 "2016-05-26T14:32:43Z")

</div>

I’d be very interested as well. Thanks for offering to share this solution.

---

<div class="post-metadata">

### Author: ![tnorthcutt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tnorthcutt/32/104102_2.png) [@tnorthcutt](https://meta.discourse.org/u/tnorthcutt)
#### Post date: [June 14, 2016, 5:14pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/10 "2016-06-14T17:14:56Z")

</div>

@HAWK any update on how you guys did this?

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [June 14, 2016, 5:17pm UTC](https://meta.discourse.org/t/showing-discourse-notifications-in-wordpress/44697/11 "2016-06-14T17:17:07Z")

</div>

Hey there,  
See @riking’s post above. 🙂
