Marketpress, disabled image links but still going to lightbox

On this page if you click on a product image I do not want it to load in a lightbox. I want it to go to the product page. In presentation settings, I have disabled "Show Image Lightbox" and also "Disable Large Image Display" is set to "YES"

What do I need to do so that the images do not open in lightbox and just go to the product page? Thanks!

  • Patrick
    • Support Monkey

    Hi there @Jeremiah

    I hope you're having a great day!

    It looks like the PrettyPhoto plugin you're using is conflicting or overriding MarketPress settings.

    Can you please first test by temporarily deactivating PrettyPhoto? We'll then see if product images still try to launch in a lightbox when clicked, or if they correctly redirect to the product pages.

    Thanks!

  • JB
    • Design Lord, Child of Thor

    Patrick,

    it is integrated into the theme, but I did find the switch in the functions scripts and disabled and you'll see that yes it goes to the product listing and not to the lightbox.

    The problem is I do need pretty photo enabled, so how can I selectively disable this for MarketPress products? Thanks for the start!

  • Andre Foisy
    • The Incredible Code Injector

    Hello there @Jeremiah

    Please try to add the following class to your image link:

    class="noLightbox"

    For example:

    <a href="http://urlpath.to/image.jpg" class="noLightbox">
    <img alt="" src="http://urlpath.to/image.jpg" /></a>

    Let us know how that works.

    Regards,
    Andre

  • Ash
    • WordPress Hacker

    Hello @Jeremiah

    I hope you are well today.

    Please add the following code in your theme's functions.php after wp_footer():

    <script type="text/javascript">
    jQuery(function($) {
      $('.mp_img_link').click(function() {
        $('.pp_overlay, .pp_pic_holder').css('display', 'none');
        window.location.href = $(this).attr('href');
      });
    });
    </script>

    Please note that, this changes will be lost in next update of your theme. So it's worth to note down this changes somewhere and apply again after your updates.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.