estou com o seguinte código:
// Script Jquery
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
// Script JS
$.ajax({
type: "GET",
url: "http://revistadesignmagazine.com/wp-json/wp/v2/posts",
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
}
}).done(function ( data ) {
console.log(data);
});
Quando realizo a chamada obtenho o seguinte erro:
"XMLHttpRequest cannot load http://revistadesignmagazine.com/wp-json/wp/v2/posts. The 'Access-Control-Allow-Origin' header has a value 'http://null' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access."
Como receber o data da chamada sem erros e exibir somente o título das postagens?