Hi Steven,
Thanks again for your quick reply. I’m afraid I’m not as smart as I had hope with this, and I wondered if you might be able to take a quick look at what I’ve done, and identify the problem?
I’ve tried modifying the code from what you suggested to Eric to suit my needs, but I just can’t get it quite right. The code I had before I modified it shows the name and country, but on 2 separate lines:
echo '<h3 class="cn-accordion-item" data-div-id="cn-detail-' , $uuid , '"' , ' style="border-top: ' , $atts['color'] , ' 1px solid; color:' , $atts['color'] , ';">' , $entry->getNameBlock( array( 'format' => $atts['name_format'] ) ) , ' ' , $entry->getAddressBlock( array( 'format' => '%country%' ) ) , '</h3>';
I modified this based on the code from your earlier post above, and changed it to:
echo ‘
<h3 class=”cn-accordion-item” data-div-id=”cn-detail-‘ , $uuid , ‘”‘ , ‘ style=”border-top: ‘ , $atts[‘color’] , ‘ 1px solid; color:’ , $atts[‘color’] , ‘;”>‘ , $entry->getNameBlock( array( ‘format’ => $atts[‘name_format’] ) ) ;
$address = $entry->getAddresses();
if ( isset( $address[0] ) ) {
if ( ! empty( $address[0]->country ) ) echo ', ' , $address[0]->country;
}
echo '</h3>
‘;
The output is now reflecting the change, with the ‘,’ and country added, but the country is still on a second line, and is now showing up in the same color as the horizontal separator, as per the image below.
Can you suggest what I have done wrong?
Many thanks,
Kevin