Forum Replies Created

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

    (@wpcompany)

    We believe this new addition resolved your issue. If you find that you still have problems please open another ticket.

    If you enjoy using our plugin, consider leaving a review.

    • This reply was modified 3 weeks, 2 days ago by WP Company.
    • This reply was modified 3 weeks, 2 days ago by WP Company.
    Plugin Author WP Company

    (@wpcompany)

    The plugin previously only applied it to the <img> element.

    Thanks to your feedback, we’ve added a new function in the latest update (1.3) that now also applies it to background images, like this:

    <div class="myelement" style="<?= MFP_Background($image_id); ?>">
    </div>

    This update adds the cover, background-image, and background-position.If you’d like to add it without the background-image, you can use this:

    <div class="myelement" style="<?= MFP_Background($image_id, false); ?>">
    </div>

    We hope this update makes things easier for you. If you have any feedback, feel free to let us know.

    Plugin Author WP Company

    (@wpcompany)

    Yes ofcourse. You can use like this:

    $image_id = get_post_thumbnail_id() ?? null;
    if($image_id) {
    $image = wp_get_attachment_image($image_id, 'full');
    echo $image;
    }

    <style>
    img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    }
    </style>
Viewing 3 replies - 1 through 3 (of 3 total)