Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="gurock-blog-posts"></div>
- <script>
- var settings = {
- "async": true,
- "crossDomain": true,
- "url": "https://blog.gurock.com/wp-json/rxwo/v1/latest-posts/?cat=92&numberposts=2",
- "method": "GET",
- "headers": {
- }
- };
- var container = jQuery("#gurock-blog-posts");
- jQuery.ajax(settings).done(function (response) {
- jQuery.each( response, function(k,v){
- container.append("<div class='news-title'><a href='"+ v.link +"'>" + v.title + "</div>");
- container.append("<p class='news-content'>" + v.content + "</p>");
- });
- });
- </script>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement