07/02/2015 at 8:44 am
#339334
Keymaster
@ Brian
Yes would need to do something similar to the link you shared but I think I would add it to the card.php file rather than implement a whole new plugin.
Rather than using the $entry->getCategoryBlock() method you have to work with the $entry->getCategory() method. That’ll return the category data rather display it.
Then you would do something like this:
foreach ( $entry->getCategory() as $category ) {
if ( $category->parent == 2 ){
array_push( $faculty, $category );
elseif ( $category->term_id == 11 ) {
$student = $category;
}
foreach ( $faculty as $person ) {
echo 'Faculty (' . esc_html( $person->name ) . ')';
}
if ( isset( $student ) ) {
echo esc_html( $student->name );
}
Hope that get you on your way!
