alexhigh
asked 6 years ago

Hi, I’m loving Wallpress but the infinite scroll is a bit much of a strain on memory usage considering my website is a photoblog. It’s a shame as I think it’s a pretty neat feature. Unfortunately I don’t know the best way of disabling this, so far I’ve disabled it by commenting out this code in functions.php:
 
/* wp_enqueue_script( ‘wallpress_jquery_infinite’, get_template_directory_uri().’/assets/js/jquery.infinitescroll.min.js’, array( ‘jquery’ ) );*/
 
I also installed a neat little plugin called ‘Page navi slider’.
 
Which did work, except disabling infinitescroll in this way also managed to disable the fancybox effect when clicking on an image for the full-size version. It now just opens the full-size image in a new tab. I’d love to retain the fancybox if at all possible.
 
Any help would be much appreciated.
Thanks, Alex

3 Answers
DominicStaff
answered 6 years ago

Hi Alexhigh !
Firstly, Please paste the following code into the functions.php file find the line 93.

 wp_enqueue_script( 'wallpress_jquery_infinite', get_template_directory_uri().'/assets/js/jquery.infinitescroll.min.js', array( 'jquery' ) );

Next, To disable Infinite Scroll in the Wallpress, You can open the jquery.custom.js file in the folder path “\wp-content\themes\dw-wallpress\assets\js” then find the line from 293 to 322, Comments inside of PHP code look like this:
– To resolve the issue of Image popup in the Wallpress. After selecting in the Format pane on the right hand side.
If your site does not yet install Jigoshop plugin, You need to add the Jigoshop plugin. You can find the plugin here: http://wordpress.org/plugins/jigoshop/
Because, Our theme using this feature from Jigoshop plugin.
Hope this helps !

alexhigh
replied 6 years ago

Thanks so much Dominic, that totally worked!

DominicStaff
answered 6 years ago

Hello Alexhigh !
Of course, you can disable Infinite Scroll in the Wallpress.
Please remove the following code in the functions.php file find the line 93.

wp_enqueue_script( 'wallpress_jquery_infinite', get_template_directory_uri().'/assets/js/jquery.infinitescroll.min.js', array( 'jquery' ) );

-To resolve the issue of Image popup in the Wallpress:
 You can add images for a post in the Feature Image panel:  log in to Dashboard > Posts > Add New > in the Format pane on the right hand side, select the Image.
See the Screenshot:
 
Also, You need to add the Jigoshop plugin. You can find the plugin here: http://wordpress.org/plugins/jigoshop/
 
Hope this helps!

alexhigh
answered 6 years ago

Hi Dominic, I did try eliminating the functions.php code you mentioned and it stops the infinite scroll but for some reason it also breaks the fancybox/lightbox image-post zoom on the front end. 
 
Usually you hit the little button in the bottom-right-hand corner of the image and wallpress gives you a larger version on the same page in a lightbox.
 
Little button shown in the screenshot:
image post button
 
Only for some reason that I can’t work out when you remove or comment-out that infinite scrolling code these image posts just open in a new tab.
 
I’m pretty baffled by this. Why do you recommend jigoshop btw?

Powered by DW Question & Answer Pro