Business Directory Plugin
[resolved] [closed] Main image without img tags (4 posts)

  1. candell
    Posted 3 years ago #

    Is it possible to grab the main image link only without all of the <img tag around it. Here's what I want to achieve

    On the listing detail page (businessdirectory-listing.tpl.php)

    <img src="mask.png" width="300" height="300" alt="Listing title" style="background: url('main-image-url.jpg')">

    For those wondering why, I am placing a fuzzy edge effect around the image {mask.png} and place the main image as a background style to appear behind the mask without needing extra div markup.



  2. businessdirectoryplugin
    Plugin Author

    Posted 3 years ago #

    You could customize the template, using the instructions found here: http://businessdirectoryplugin.com/support-forum/faq/customizing-bd-to-fit-your-theme/

    Aside from that, you'd have to hack the plugin which I wouldn't recommend because it would preclude you from further updates without losing your changes.

  3. candell
    Posted 3 years ago #

    Thanks for the reply, I am customizing the template businessdirectory-listing.tpl.php, $main_image returns the entire image tag, how do I return just the url of the image?

    I also need to do the same in the extra images loop

    <?php foreach ($extra_images as $image): ?>
    <?php echo $image; ?>
    <?php endforeach; ?>

    Great plugin, I am enjoying customising the templates to give it the look and feel I need.

  4. businessdirectoryplugin
    Plugin Author

    Posted 3 years ago #

    Not sure off hand. I'll have to research that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Business Directory Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.