I am trying to ensure only posts of a certain tag show up on my homepage of my tumblr, (i.e. posts tagged "News"). Can it be done, and how?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Definitely possible but would involve using Tumblr's API. Below is an example using the JSON API and jQuery...
$.getJSON("http://{Name}.tumblr.com/api/read/json?tagged='[WHATEVER TAG YOU SPECIFY]'&callback=?", function(data) {
// Rest of code here...
});
The {Name} tag automatically places the tumblr's name into the API URL. From here you would likely use jQuery to append to the resultant post data to somewhere on your page like a "Featured Posts" div.
http://www.tumblr.com/docs/en/api
http://api.jquery.com/jQuery.getJSON/