09/28/2017 at 3:26 pm
#436414
Participant
I haven’t adjusted any other coding. Here’s how it looks
echo '<div class="cn-detail cn-clear' . $show . '" id="cn-detail-' , $uuid , '">';
echo '<div class="cn-left">';
$entry->getImage( array(
'image' => $atts['image'],
'height' => 120,
'width' => 100,
'fallback' => array(
'type' => $atts['image_fallback'],
'string' => $atts['str_image']
)
)
);
echo '</div>';
echo '<div class="cn-right">';
if ( $atts['show_title'] )$entry->getTitleBlock();
if ( $atts['show_org'] ) $entry->getOrgUnitBlock();
if ( $atts['show_contact_name'] )$entry->getContactNameBlock( array( 'format' => $atts['contact_name_format'] , 'label' => $atts['str_contact'] ) );
if ( $atts['show_family'] )$entry->getFamilyMemberBlock();
if ( $atts['show_addresses'] ) $entry->getAddressBlock( array( 'format' => $atts['addr_format'] , 'type' => $atts['address_types'] ) );
if ( $atts['show_phone_numbers'] ) $entry->getPhoneNumberBlock( array( 'format' => $atts['phone_format'] , 'type' => $atts['phone_types'] ) );
if ( $atts['show_email'] ) $entry->getEmailAddressBlock( array( 'format' => $atts['email_format'] , 'type' => $atts['email_types'] ) );
if ( $atts['show_dates'] ) $entry->getDateBlock( array( 'format' => $atts['date_format'], 'type' => $atts['date_types'] ) );
if ( $atts['show_links'] ) $entry->getLinkBlock( array( 'format' => $atts['link_format'], 'type' => $atts['link_types'] ) );
$text = $entry->getMeta(
array(
'key' => 'business_offerings', // This should match exactly the field id used when registering the custom field.
'single' => TRUE // Do not change this.
)
);
if ( ! empty( $text ) ) echo '<p>' . esc_html( $text ) . '</p>';
if ( $atts['show_im'] ) echo $entry->getImBlock();
if ( $atts['show_social_media'] ) echo $entry->getSocialMediaBlock();
$entry->getContentBlock( $atts['content'], $atts, $template );
if ( $atts['enable_bio'] && $entry->getBio() != '' ) {
echo '<div class="cn-bio" id="cn-bio-' , $uuid , '">';
if ( $atts['enable_bio_head'] ) echo '<h5>' , $atts['str_bio_head'] , '</h5>';
echo $entry->getBioBlock();
echo '</div>';
}
if ( $atts['enable_note'] && $entry->getNotes() != '' ) {
echo '<div class="cn-notes" id="cn-bio-' , $uuid , '">';
if ( $atts['enable_note_head'] ) echo '<h5>' , $atts['str_note_head'] , '</h5>';
echo $entry->getNotesBlock();
echo '</div>';
}
echo '</div>';
echo '</div>';
?>
-
This reply was modified 8 years, 10 months ago by
Steven Zahm. Reason: Correct code formatting
