# High Level - Need an Expert Level Person- Wordpress Posts are NOT displayed ( Dont think the solution is easy)

**URL:** <https://forum.ionicframework.com/t/high-level-need-an-expert-level-person-wordpress-posts-are-not-displayed-dont-think-the-solution-is-easy/179535>\
**Category:** ionic-v3\
**Created:** [December 12, 2019, 5:33am UTC](https://forum.ionicframework.com/t/high-level-need-an-expert-level-person-wordpress-posts-are-not-displayed-dont-think-the-solution-is-easy/179535 "2019-12-12T05:33:11Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [December 13, 2019, 11:17pm UTC](https://forum.ionicframework.com/t/high-level-need-an-expert-level-person-wordpress-posts-are-not-displayed-dont-think-the-solution-is-easy/179535/23 "2019-12-13T23:17:18Z")

</div>

> [@HakanGoker](#):
>
> thats the default wordpress rest api which I cant do anything about it

There are probably a zillion Google results on how to add CORS headers to WordPress, but it’s not something I have ever dealt with. If that’s undoable for whatever reason, you could always add a layer of indirection and create a middleware proxy that delivers the proper headers and repackages the response from the problematic endpoint.

---

<div class="post-metadata">

**Author:** ![HakanGoker](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hakangoker/32/130029_2.png) [@HakanGoker](https://forum.ionicframework.com/u/HakanGoker)\
**Post date:** [December 13, 2019, 11:22pm UTC](https://forum.ionicframework.com/t/high-level-need-an-expert-level-person-wordpress-posts-are-not-displayed-dont-think-the-solution-is-easy/179535/24 "2019-12-13T23:22:09Z")

</div>

yes there lots of ways. plugins, actions, hooks but I am concerned if this is secure. I will check this… I was thinking to implement it in /quikbooze-client.php same as the others. curl to the rest api and display it same as the other responses.

But hey thank you. You have been very helpful.

---

<div class="post-metadata">

**Author:** ![HakanGoker](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hakangoker/32/130029_2.png) [@HakanGoker](https://forum.ionicframework.com/u/HakanGoker)\
**Post date:** [December 13, 2019, 11:42pm UTC](https://forum.ionicframework.com/t/high-level-need-an-expert-level-person-wordpress-posts-are-not-displayed-dont-think-the-solution-is-easy/179535/25 "2019-12-13T23:42:24Z")

</div>

Adding this in functions php worked. I think its fine since Methods: GET’

\<?php function my\_customize\_rest\_cors() { remove\_filter( 'rest\_pre\_serve\_request', 'rest\_send\_cors\_headers' ); add\_filter( 'rest\_pre\_serve\_request', function( $value ) { header( 'Access-Control-Allow-Origin: \*' ); header( 'Access-Control-Allow-Methods: GET' ); header( 'Access-Control-Allow-Credentials: true' ); header( 'Access-Control-Expose-Headers: Link', false ); return $value; } ); } add\_action( 'rest\_api\_init', 'my\_customize\_rest\_cors', 15 );

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [December 19, 2019, 4:53pm UTC](https://forum.ionicframework.com/t/high-level-need-an-expert-level-person-wordpress-posts-are-not-displayed-dont-think-the-solution-is-easy/179535/26 "2019-12-19T16:53:13Z")

</div>

Closed on December 19, 2019, 4:53pm UTC



[Previous page](https://forum.ionicframework.com/t/high-level-need-an-expert-level-person-wordpress-posts-are-not-displayed-dont-think-the-solution-is-easy/179535.md?page=1)
