Support » Plugins and Hacks » Business Directory Plugin » [Resolved] Main image without img tags

[Resolved] Main image without img tags

  • candell


    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.



Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author businessdirectoryplugin


    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.



    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.

    Plugin Author businessdirectoryplugin


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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Main image without img tags’ is closed to new replies.
Skip to toolbar