Support » Plugin: Business Directory Plugin » Easy way to relocate images in listing page

  • Thought someone might find this useful. I needed to relocate the listing images from the bottom of the page to another postition. In my case just above my Description ‘as Content’ field

    At the same time I wanted to avoid changing the plugin code so that my mods would survive plugin updates. Here’s what I did.

    1. In the Manage Form Fields admin menu create a new text field (I called it IMAGES), and position it in the listing where you’d like the images to appear.
    2. Edit the listing in the directory and insert a unique string into the newly created field (I inserted the text images go here)
    3. Copy the file wp-content/plugins/business-directory-plugin/templates/businessdirectory-listing.tpl.php to your theme folder and edit, replacing lines 17-28 with this…
    <?php $listing_fields_split = explode ( '<div class="field-value wpbdp-field-images meta"><label>IMAGES:</label> <span class="value">images go here</span></div>', $listing_fields ); ?>
    <div class="listing-details-0 listing-details cf <?php if ($main_image): ?>with-image<?php endif; ?>">
        <?php echo $listing_fields_split[0];?>
    <?php if ($extra_images): ?>
    <div class="extra-images">
        <?php foreach ($extra_images as $image): ?>
            <li><?php echo $image; ?></li>
        <?php endforeach; ?>
    <div class="listing-details-1 listing-details cf">
        <?php echo $listing_fields_split[1]; ?>

    You ca use the new CSS classes listing-details-0 and listing-details-1 for styling control.

    Not the most elegant solution, but it works!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Easy way to relocate images in listing page’ is closed to new replies.