Photoswipe

Mauer Themes Support Stills Photoswipe

This topic contains 1 reply, has 2 voices, and was last updated by  Paul 3 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3565

    debje
    Participant

    Hi Paul,

    A while back, you helped me with disabling the photoswipe (lightbox) gallery within the project pages. Since the theme got upgraded, the scripts you provided me to disable this no longer seem to work. Is there a way to disable this functionality within the latest version of Stills?

    Thanks in advance 🙂
    Best, Deborah

    #3572

    Paul
    Keymaster

    Hi Deborah,

    You can achieve this in the new version of Stills by adding the following code to the end of your function.php file just before the closing ?> (see screenshot).

    function mauer_stills_custom_dequeues() {
    	wp_dequeue_script('photoswipe');
    	wp_dequeue_script('photoswipe-ui-default');
    	wp_dequeue_script('mauer-stills-gallery-photoswipe-builder');
    	wp_dequeue_style('photoswipe');
    	wp_dequeue_style('photoswipe-default-skin');
    }
    add_action('wp_print_scripts', 'mauer_stills_custom_dequeues', 100);
    
    function mauer_stills_custom_inline_scripts_and_styles() {
      if (wp_script_is('jquery', 'done')) { ?>
    	<script type="text/javascript">
    		jQuery(function($) {
    			$(document).ready(function(){
    				$(".mauer-stills-gallery-pswp-big-img-link").removeAttr('href')
    				$(".mauer-stills-gallery-pswp-big-img-link").click(function(e){e.preventDefault();});	
    			});
    		});
    	</script>
    	<style>
    		.mauer-stills-gallery-pswp-big-img-link {cursor: default;}
    	</style><?php
      }
    }
    add_action( 'wp_footer', 'mauer_stills_custom_inline_scripts_and_styles' );
    

    Kind regards,
    Paul

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.