Hi,
I can't get the following to work - does attachment.php accept conditional tags?
<?php if (in_category('3')) { ?>
CAT 3!
<?php } else {?>
NOT CAT 3
<?php } ?>
thanks,
R
Hi,
I can't get the following to work - does attachment.php accept conditional tags?
<?php if (in_category('3')) { ?>
CAT 3!
<?php } else {?>
NOT CAT 3
<?php } ?>
thanks,
R
Actually, scrap that, instead:
Does attachment.php recognise <?php post_class() ?> - as mine isn't. What would be a suitable alternative?
thanks in advance,
R
Does attachment.php understand which category it is in?
Fixed my own problem.
Shall I tell? Ok..
My solution is to use get_category_parents. Good thread about it here:
http://wordpress.org/support/topic/293262?replies=8
what happens when you change the category though? on my install, the attachment never uses the correct template when it checks the attachment's category
This topic has been closed to new replies.