Return to Snippet

Revision: 9935
at December 1, 2008 03:09 by creator


Updated Code
<?php if (in_category('events')) : ?> 
	<div class='eventinfo'> 
		<h2>Event Details</h2>
		<?php the_meta(); ?>
	</div>
<?php endif; ?>

Revision: 9934
at December 1, 2008 03:06 by creator


Initial Code
<?php if (in_category('events')) : ?> 
	<div class='eventinfo'> 
		<h2>Event Details</h2>
		<?php the_meta(); ?>
	</div>
<?php ?>

Initial URL


Initial Description
For use on a single page... Only displays the content if the displayed post is in the specified category. You can use the category slug or the category ID if you know it.

Initial Title
WordPress: If In Category

Initial Tags
wordpress, category

Initial Language
PHP