08/17/2017 at 11:09 am
#432627
Keymaster
@ Trevor
Sure this is doable you would add something like this to the card.php and card-single.php files for the template.
Something like this:
$categories = array();
foreach ( $entry->getCategory() as $category ) {
$categories[ $category->slug ] = $category->name;
}
if ( true == $atts['show_image'] ) {
if ( is_user_logged_in() ) {
// code to display image
}
} else {
if ( array_key_exists( 'senior-management', $categories ) ) {
// code to display image
} else {
// I do not think you need this else since it does not do anything.
}
}
Hope this helps!
