Add last 1, 2, 3, 4, 5 post (all post I need) embed in my html web site. without Iframe
-
I need to embed some (wordpress) post in my HTML website, I Explain all in this forum
http://www.lawebdelprogramador.com/foros/JavaScript/1569655-Insertar-diversos-post-en-html-con-js-del-blog-tumblr.htmlIn my web you can see some example what I want http://conexion6.com/ but I prefer Wp than Tumblr..
Can anybody help me?
Someone help me using Tuymblr, using this code:
<html>
<head>
<script type=’text/javascript’ src=’https://code.jquery.com/jquery-3.1.1.min.js’></script>
<script>
$(document).ready(function() {
var api_key = ‘fuiKNFp9vQFvjLNvx4sUwti4Yb5yGutBN4Xh10LXZhhRKjWlV4’; // necesitas tu llave
var url = ‘https://api.tumblr.com/v2/blog/conexion6.tumblr.com/posts/text?api_key=’ + api_key + ‘¬es_info=true’;
$.ajax({
type: ‘GET’,
url: url,
dataType: ‘JSONP’,
success: function(r) {
var status = r.meta.status;
var posts = r.response.posts;
if (status == 200 && posts.length > 1) {
// puedes decidir tu donde ponerlos. Yo usè ‘post1’ y ‘post2’ como contenedores
$(‘#post1’).append(posts[0].body); // ultimo
$(‘#post2’).append(posts[1].body); // penultimo
$(‘#post2’).append(posts[2].body); // penultimo
$(‘#post3’).append(posts[3].body); // penultimo
$(‘#post4’).append(posts[4].body); // penultimo
$(‘#post5’).append(posts[5].body); // penultimo
$(‘#post6’).append(posts[6].body); // penultimo
$(‘#post7’).append(posts[7].body); // penultimo
$(‘#post8’).append(posts[8].body); // penultimo
$(‘#post9’).append(posts[9].body); // penultimo
$(‘#post10’).append(posts[10].body); // penultimo}
},
error: function(response) {
console.log(response);
}
});
});
</script>
</head>
<body>
<div>
<div id=’post1′></div>
<hr>
<div id=’post2′></div>
<hr>
<div id=’post3′></div>
<hr>
<div id=’post4′></div>
<hr>
<div id=’post5′></div>
<hr>
<div id=’post6′></div>
<hr>
<div id=’post7′></div>
<hr>
<div id=’post8′></div>
<hr>
<div id=’post9′></div>
<hr>
<div id=’post10′></div>
</body>
</html>The blog I need help with is: (visible only to logged in users)
-
In other hand I’m using the framework Foudation and I found on Internet this code line, buy only shows the last post… No matter if I change the numbers after js?start=1
<div class=”row”>
<div class=”largue-4 medium-4 columns”><script type=”text/javascript” src=”http://conexion6.tumblr.com/js?start=1&num=1″></script></div>
<div class=”largue-4 medium-4 columns”><script type=”text/javascript” src=”http://conexion6.tumblr.com/js?start=1&num=1″></script></div>
<div class=”largue-4 medium-4 columns”><script type=”text/javascript” src=”http://conexion6.tumblr.com/js?start=1&num=1″></script></div>
</div>
- The topic ‘Add last 1, 2, 3, 4, 5 post (all post I need) embed in my html web site. without Iframe’ is closed to new replies.