• 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

Quick Tip: Using WordPress Slug-based Category Templates

January 11, 2010 By Lorraine

If you create custom themes for WordPress, chances are you’ve already used category templates in the past. They usually look like this:

category-x.php

where x corresponds to the ID number of the category, and are extremely useful if you want to give a specific category a certain look. For example, if you wanted to add an “Asides” area to your theme, you’d create a category named Asides, get the numerical ID of that category (e.g. “3”) and create a template file named category-3.php

My problem, of course, was having to find the ID of the category, which could vary from one WP installation to another. The truth is that I usually chose to go the route of conditional queries instead, doing something like this:

if ( is_category(‘asides’) ) {
// what I’d like to show for my asides
}

WordPress 2.9, however, has added support for slug-based category templates. So instead of naming my template category-3.php, I can go ahead and name it something wonderfully semantic like category-asides.php

The hierarchy in which WordPress looks for which template to use has been updated as well. Now, it’ll look for the slug-based template first, then the ID-based template, and finally the default template.

Do you use WordPress category templates in your themes?

Filed Under: Code Tagged With: templates, wordpress

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

Top 6 Online Resources for Designers and Creative Freelancers

Search