I got the if conditional script working but the problem is the <?php the_title(); ?> & <?php the_category(', ') ?> aren't displaying anyone know why? <?php $in_subcategory = false; foreach( explode( "/", get_category_children( 8 ) ) as $child_category ) { if(in_category($child_category))$in_subcategory = true; } if ( $in_subcategory || in_category( 8 ) ) { echo '<p class="postmetadata alt"> <?php the_title(); ?> is filed under <?php the_category(', ') ?> category. You can visit the <?php the_category(', ') ?> category to find all the episodes of this series. '; } else { echo '<span class="bad-cat">Not tasty! Not healthy!</span>'; } ?> Code (markup):
didn't looked lot in code but echo needs semicolan. and the_title() function itself in php script no need of php initiations echo '<p class="postmetadata alt"> <?php the_title(); ?> is filed under <?php the_category(', ') ?> category. You can visit the <?php the_category(', ') ?> category to find all the episodes of this series. Code (markup):
Are those codes within The Loop? From what I read in the WordPress Codex, i think the_category and the_title should be in The Loop.