# A way to include Discourse posts in Wordpress search results? Any clever ideas?

**URL:** https://meta.discourse.org/t/a-way-to-include-discourse-posts-in-wordpress-search-results-any-clever-ideas/58672
**Category:** WordPress
**Created:** [08.Март.2017 22:07:26 UTC](https://meta.discourse.org/t/a-way-to-include-discourse-posts-in-wordpress-search-results-any-clever-ideas/58672 "2017-03-08T22:07:26Z")
**Posts on this page:** 6
**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: [08.Март.2017 22:07:26 UTC](https://meta.discourse.org/t/a-way-to-include-discourse-posts-in-wordpress-search-results-any-clever-ideas/58672/1 "2017-03-08T22:07:26Z")

</div>

Let’s say you loads of informative articles in the Wordpress part of your site and then of course loads of informative conversations in the Discourse part of your site.

When you type a phrase into the Wordpress search box, it would be really cool if relevant Discourse threads could come up in addition to the relevant Wordpress articles.

Has anyone found a clever way to do this? This is not a deal breaker of course. It would just be really useful.

---

<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: [09.Март.2017 20:28:37 UTC](https://meta.discourse.org/t/a-way-to-include-discourse-posts-in-wordpress-search-results-any-clever-ideas/58672/2 "2017-03-09T20:28:37Z")

</div>

Perhaps the easiest way to accomplish this would be to use a custom search engine, like Elasticsearch or Algolia:

> **[ElasticPress](https://wordpress.org/plugins/elasticpress/)**
>
> A fast and flexible search and query engine for WordPress.

> **[Search by Algolia – Instant & Relevant results](https://wordpress.org/plugins/search-by-algolia-instant-relevant-results/)**
>
> Search by Algolia is the smartest way to improve search on your site. Autocomplete is included, along with full control over look, feel and relevance.

See this:

[https://meta.discourse.org/t/quick-question-about-api-cross-platform-search/52340?u=erlend\_sh](https://meta.discourse.org/t/quick-question-about-api-cross-platform-search/52340)

---

<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: [09.Март.2017 20:51:49 UTC](https://meta.discourse.org/t/a-way-to-include-discourse-posts-in-wordpress-search-results-any-clever-ideas/58672/3 "2017-03-09T20:51:49Z")

</div>

It could also be done by making a search request to Discourse through the Discourse API and including the results of that request with the WordPress search results.

---

<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: [09.Март.2017 21:01:35 UTC](https://meta.discourse.org/t/a-way-to-include-discourse-posts-in-wordpress-search-results-any-clever-ideas/58672/4 "2017-03-09T21:01:35Z")

</div>

Thanks @simon. I’m going to try that. I hadn’t realized the Discourse API had search functionality.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [09.Март.2017 22:57:28 UTC](https://meta.discourse.org/t/a-way-to-include-discourse-posts-in-wordpress-search-results-any-clever-ideas/58672/5 "2017-03-09T22:57:28Z")

</div>

If you solve this do let us know here! My community would benefit greatly.

---

<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: [06.Сентябрь.2017 15:44:38 UTC](https://meta.discourse.org/t/a-way-to-include-discourse-posts-in-wordpress-search-results-any-clever-ideas/58672/6 "2017-09-06T15:44:38Z")

</div>

I started a new thread with a solution I came up with here:

> [@Add forum search results to WordPress search](https://meta.discourse.org/t/solution-how-to-add-forum-search-results-to-wordpress-search/68782):
>
> Hello all. I finally found a little slice of time to try pulling search results from Discourse into Wordpress’s search. The gist is that I created a separate script which uses the Discourse API to do a search query and then I just include this as an iframe in the Wordpress search template. This may not be the ideal solution for everyone because it show the Discourse results in a separate column from the Wordpress results, not all mixed together. Here’s a screenshot of how it looks. The forum r…
