Display Location / Address Below Directory Listing in DirectoryPress

To display Location / Address Below Directory Listing in DirectoryPress, you need to edit _item.php in your theme folder.

You can customize it how ever you want, (I have used it right before the bottom of </div> tag) I am just sharing the code below.

<div>
<span style=”color:#FFF;”><b>Reach <?php $key=”companyname“; echo get_post_meta($post->ID, $key, true); ?>:</b></span> &nbsp;<?php $key=”address“; echo get_post_meta($post->ID, $key, true); ?> <?php $key=”area“; echo get_post_meta($post->ID, $key, true); ?> <?php $key=”city“; echo get_post_meta($post->ID, $key, true); ?> <?php $key=”state“; echo get_post_meta($post->ID, $key, true); ?>
</div>

Please Remember, those are the custom field value which was created by me and the same function has been called here to display the location or address. So change your custom field value in the code

Leave a Reply