• hariz92

    (@hariz92)


    Hi I using the rest api to implement my wordpress website on mobile apps. But some of the content cannot be view because it is protected by other plugin.
    tmp.innerHTML = response.data.content.rendered; The content cannot be view. How can I solve this?

    $http.get(wordpress_url+’/wp-json/wp/v2/posts/’+$scope.posts)
    .then(function(response){
    $scope.loadDetail = true;
    var tmp = document.createElement(‘div’);
    tmp.innerHTML = response.data.content.rendered;
    var a = tmp.querySelectorAll(‘a’);
    for(var i=0; i<a.length; i++){
    var attributes = “openLink(‘”+a[i].getAttribute(‘href’)+”‘)”;
    a[i].setAttribute(“ng-click”, attributes);
    a[i].setAttribute(“href”, “javascipt:void(0)”);
    }

  • The topic ‘Content cannot view’ is closed to new replies.