Conditional Statement for a Custom Post Type Category
-
Hey all
I have been trying to work out a conditional statement for a custom post type category. I want to do a “if” the post type category is X, then show Y and if it is not X, then show Z. I currently and trying the following but it isn’t working and I don’t know what to do. Any help would be awesome!Thanks
<?php if (array ('post_type' => 'linecard', 'is_category' => '5')):?> <?php echo '<a href="' . get_permalink($pageChild->ID) . '">'. get_the_post_thumbnail($pageChild->ID).'</a>' ?> <?php else :?> <?php echo '<a href="' . get_permalink($pageChild->ID) . '">'. get_the_post_thumbnail($pageChild->ID).'</a>' ?> <?php endif;?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Conditional Statement for a Custom Post Type Category’ is closed to new replies.