02/12/2014 at 8:23 am
#279899
Keymaster
@ Eric
To Pull a specifc category out of the group, somthing like this should do the trick:
foreach ( $entry->getCategory() as $category ) {
if ( $category->name == 'Provider' || $category->name == 'Researcher' ) $profession = $category->name;
}
Now you can use $profession instead of the getCategoryBlock() function.
Probably the best way to limit the location is to use the Preferred option when entering the addresses. The with a minor tweak to the getAddressBlock() function arguments you can limit the result to just the Preferred address.
$entry->getAddressBlock( array( 'format' => '%city%, %country%', 'preferred' => true ) );
If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!
http://wordpress.org/support/view/plugin-reviews/connections
