Catagory Logic for WordPress Template
Sometimes when designing a wordpress site you need to be able to tell specific content where to appear depending on which category is being viewed. This can be achieved using an if statement combined with the in_category test.
Example:
if ( in_category('4') )
{
//do this
}
else if ( in_category('5') )
{
//do this
}
else
{
//do this
}
Post Info
Leave a Comment
Browse by Category
- Announcements (2)
- Concepts (3)
- CSS News (508)
- CSS Properties (3)
- Digital Economy News (344)
- Hacks (1)
- Legislation (1)
- PHP Scripts (2)
- University (1)
- Web 2.0 News (624)
- Wordpress Functions (5)
