• Home
  • About
  • Contact
  • Advertise

Devlounge

Design, Develop, and Grow

ateşli sevgilisi fantezisini yaşamak istediğini söyler porno ona arkadaşları varken onunla gizli saklı seks yapmak istediğini sikiş söyleyen kız hafta sonu için gelen arkadaşının görmediği bir sikiş açıdan sakso çekmeye başlayınca adamın yarağını bu altyazılı porno şekilde indiremez ve açık şekilde salonda sikişimeye sex izle başladıklarında misafir kızı da bu sekslerine rokettube konuk ederler seks yapacağını düşünmeyerek onun sex izle oyun oynadığını zanneder sabah olur ve herkes uyanır hd porno bu sırada yanında şişme mankenini de getiren sapık erotik hikayeler genç sınav haftası ders çalışan genç adam üvey annesinin sikiş eve gelmesiyle hayatının şokunu yaşar

  • Home
  • Code
  • Design
  • Design Focus
  • Interviews
  • Publishing
  • Strategy
  • Webapps
  • Extras

WordPress Snippet: Display Posts by Tag Frequency

March 23, 2009 By Dustin Boston

Blogs just aren’t the same as they used to be. In the old days a blog was characterized by time and personality—chronology was important, and you read the blog because of the author, not the information he could give you.

Nowadays blogs are used more for short bursts of information about a single topic—typically a blogger’s expertise. The personality behind a site barely matters. “Content is king!” as you may recall.

So if chronology is no longer important, why post by date? I think part of the answer is that WordPress displays dates by default in most themes. Let me propose an alternative way of displaying content in WordPress. By tag frequency.

Making tags useful

Tags provide wonderful meta information about a post, but sadly this information is typically relegated to an ugly list in the sidebar. I say, if you’re going to go to the work of tagging all those posts, you had better use those tags for something useful!

By adding a couple snippets outside “The Loop” in WordPress you can display N number of posts by X tag. Here is an example to help make it a little more clear:

Imagine you have 20 posts tagged Home and Garden, 10 tagged Clearance, and 13 tagged Hardware. With a bit of PHP we can get WordPress to display posts from each tag in order of most popular to least popular. We can even take it a step further and limit the number of tags to display. The end result might look something like this:

HOME AND GARDEN
* Tag 1 Post 1 Title
* Tag 1 Post 2 Title
* Tag 1 Post 3 Title
* Tag 1 Post 4 Title

HARDWARE
* Tag 2 Post 1 Title
* Tag 2 Post 2 Title
* Tag 2 Post 3 Title
* Tag 2 Post 4 Title

CLEARANCE
* Tag 3 Post 1 Title
* Tag 3 Post 2 Title
* Tag 3 Post 3 Title
* Tag 3 Post 4 Title

Now that is a usable list of tags that makes the content readily available. A great side effect of displaying posts by tag frequency is that your site become much more dynamic. For example, maybe you go to a plumbing conference and blog 30 posts about it, all tagged Plumbing. The content on the site will automatically start displaying the posts tagged with Plumbing at the top of the list. I call it the “bubbling” homepage.

Enough rambling, here’s the code:

[php]

query(“tag={$tagRight->slug}&showposts=$noOfPosts”);
?>
have_posts() ) :?>

name ?>

have_posts() ) : $postsRight->the_post(); ?>

Code & Tutorials

Which Front-End Development Languages Will Grow in 2017?

Your Guide to Leveraging APIs as a Developer

Bitcoin Processing Website Integration For Web Developers

Website Security For 2016 That All Developers Need To Know

5 Reasons You Need to Be Using jQuery

About Devlounge

Want to read more about Devlounge, or maybe you want to contact us, or even advertise? Oh, and don't forget to subscribe to updates!

The Best of Devlounge

Should You Start a Business or Remain Independent?

Search