2 sam2kb Aug 19, 2008 16:48


Yeah the third does the trick. I'll test it when I get a round tuit but what I want to do is put it in the <head> section so I can pick a style sheet based on the main cat name. Like the third bit you showed eh?
That way IF a post is in a category named "photos" then I can ditch the sidebar and widen up the main column. With an appropriate 'fit_image_width_thing_trick'.
I think... ;)

<?php
if( !empty( $cat ) )
{
  switch( $cat )
  {
    case 1:
      // do summat
      break;
    case 2:
      // do summat
      break;
    case etc:
      // do summat
      break;
    default:
      // do summat ... or not, up to you
      break;
  }
}
?>
¥
*edit*
Actually, I'm talking bollocks, that'd only work if the visitor clicked to view a category :-S
Ahhh well .. not the first time I've talked bollocks ... and certainly won;t be the last :p
I don't understand exactly what you need, I hope this might be helpful.