0

I'm trying to display Wordpress blog posts on a different domain. It displays on all browsers except for IE.

Here's my code:

$.ajax({
     url: 'www.whatevermywordpresswebsiteis.com/wp-json/wp/v2/posts?_embed&per_page=100',
     crossDomain: true,
     cache: false,
     dataType: "json",
     contentType: "application/json; charset=utf-8",
     type: 'GET',
     async: false,
     data: { action : 'get_ajax_posts' },
     success: function(data) {
     $.each(data, function(i, _post) {
         console.log(data);
     });
     }
     });

I've tried to implement XDomainRequest as well but it still fails to work (Jquery $.ajax fails in IE on cross domain calls). I'm not sure what to do at this point.

Maria
  • 1
  • 1

0 Answers0