I use jQuery to get a recognized entry (n number of them) from the default 'featured' category. I applied this solution to my theme - Purely
Here is a screenshot (showing three recognized posts)
Add this meta section of the line
<meta name='text:Featured Tag' content='featured' />
Add jQuery library to
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
Add these lines to where you want the published post to appear.
{block:IndexPage} {block:IfFeaturedTag} <h1 class="featured-subhead"> Featured Posts <a href="/tagged/{text:Featured Tag}"> + </a> </h1> {/block:IfFeaturedTag} {/block:IndexPage}
Add these lines immediately before the closing tag.
{block:IndexPage}{block:IfFeaturedTag} <script> var rssurl = '/tagged/{text:Featured Tag}/rss'; $.get(rssurl, function(data) { $('.featured-subhead').append('<div class="featured-posts">'); var $xml = $(data); var vari = 0; $xml.find("item").each(function() { var $this = $(this), item = { title: $this.find("title").text(), link: $this.find("link").text(), description: $this.find("description").text(), pubDate: $this.find("pubDate").text(), author: $this.find("author").text() } vari = vari +1; if(vari <4){ $('.featured-subhead').append('<div class="featured-post" style="overflow:hidden;"><h2 class="featured-title"><a href="' + item.link + '">' + item.title + '</a></h2><div class="featured-post-description' + vari + '">' + item.description + '</div><div class="featured-post-link"><a href="' + item.link + '">Read More</a></div></div>');
You can change if (vari <4) {line according to the message numbers you want to display as shown. For example, to display a single record, this would be if (vari <2) {.
I also added some CSS classes to develop the output. This can be declared in a segment in
h1.featured-subhead { } .featured-posts { } .featured-post { } h2.featured-title { } .featured-post-description { } .featured-post-link { }
Only the featured-subhead class is needed here. This must be added to the title of the note. After that, jQuery will add recommended posts.
How it works? There are no surprises here. Tumblr creates an RSS tag page for each page. Using javascript, I retrieve this page with specific tags and output the "n" number of elements from the XML elements. Sometimes Tumblr takes a little longer (I don't know why) to create an RSS page for newly added tags. Be patient and try looking at your-blog.tumblr.com/tagged/featured/rss page to make sure it is generated or not.