Trishah Woolley
asked 10 years ago

I’d like to just display the images and a little text under each picture. How do I turn off the shadowbox/lgihtbox/popup in the portfolio section?

3 Answers
Trishah Woolley
answered 10 years ago

I figured it out, I removed the jQuery sections in dw-page-modern/inc/assets/js/modal_on_mobile.js and dw-page-modern/inc/assets/js/modal_on_desktop.js that started with the following:


jQuery(‘.portfolio .thumbnail a.show-popup’).on(‘click’,function(e){

I’m a bit concerned about doing these edits in the parent theme files and not in my child theme.  Is there a way to put these files in my child theme so they are not overwritten during updates?
 

DominicStaff
answered 10 years ago

You can create a child theme first, then copy the modal_on_desktop.js file & modal_on_mobile.js file in the Parent theme and paste  into your child theme.

Trishah Woolley
replied 10 years ago

I tried this. I used the same directory structure as in the parent theme, but it didn’t work. Are you saying that the .js files should just go in the main child directory without it being inside any other directory?

Wilfred
answered 10 years ago

Hi Trishah,
To resolve this issue, please add following code to Footer code in Dashboard / Appearance / Customize / Custom code 

<script>
jQuery(function($){
$('.portfolio .thumbnail a.show-popup').removeAttr('data-post');
});
</script>

Hope this helps!

Trishah Woolley
replied 10 years ago

Works perfect! Thank you for the code 😀

Powered by DW Question & Answer Pro