plugins - How do I put a word-press blog into my static site without installing wordpress on server?

The requirement is that the user will post a blog on wordpress panel and it will post on wordpress blog section and on a

The requirement is that the user will post a blog on wordpress panel and it will post on wordpress blog section and on a static website(example) too. I am using pure java script and bootstrap.

The requirement is that the user will post a blog on wordpress panel and it will post on wordpress blog section and on a static website(example) too. I am using pure java script and bootstrap.

Share Improve this question edited Mar 10, 2020 at 23:30 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Feb 14, 2020 at 6:56 Umair ArshadUmair Arshad 1
Add a comment  | 

1 Answer 1

Reset to default 0

I think that you should have a look at the WordPress API. https://developer.wordpress/rest-api/reference/posts/#example-request

It allows you to fetch all posts with Javascript or any other language.

e.g.

jQuery.ajax({
    type: 'GET',
    url: "http://example/wp-json/wp/v2/posts",
    success: function(data) {
        var obj = JSON.stringify(data);
        var result = jQuery.parseJSON(obj);
        console.log(result);
    }
});

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744680659a4587601.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信