WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. candell
    Member
    Posted 1 year 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.

    Thanks

    http://wordpress.org/extend/plugins/business-directory-plugin/

  2. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.