Questions tagged [infinite-scroll]

Infinite Scroll allows a web page to load new content dynamically as a user reaches the bottom of the current page.

3
votes
2answers
2k views

Pagination/infinite scroll with WP_Query and multiple loops

I need that the main page of my site have 3 columns: - The first having the 5 most viewed posts; - The second with the next 5 most viewed posts; - The third with the most recent posts. I don't want ...
3
votes
2answers
5k views

Wordpress Infinite Scroll without using any plugin

Background information can be skipped. I wanted to use the infinite scrolling option on my Wordpress theme, but I am not well trained in Javascript so I tried this solution: https://wptheming.com/...
3
votes
1answer
962 views

Custom Loop and Infinite Scroll

I am using customized version of _s theme where I have Product CPT. In the following files, I need to use Infinite scroll (provided by Jetpack) - archive-products.php taxonomy-[tax-name].php ...
2
votes
1answer
2k views

Jetpack infinite scroll render - make different depending on post type?

I am currently working on a theme which has two post types - one is the normal "posts" post type, and the other is for portfolio posts - "mytheme_portfolio". I am using JetPack's infinite scroll to ...
2
votes
1answer
2k views

Add Infinite Scroll to Ajax Loaded Category Query

Update: This has been resolved. See update below. Following a few different online tutorials, I've managed to create a function to modify my post display via Ajax based on a category selected from a ...
2
votes
1answer
605 views

Adding LazyLoad and InfiniteScroll to Wordpress Theme

I would like to add both the LazyLoad and InfiniteScroll jQuery plugins to my Wordpress Theme. They both work well when used by themselves, but when i use them together the LazyLoad Plugin doesn't ...
2
votes
1answer
1k views

Isotope with Infinite Scroll

Using Jetpack Infinite Scroll & Isotope (Masonry). I am facing an issue where after every new ajaxed set of posts, I need to destroy and then build isotope layout. If I don't go with this ...
1
vote
1answer
2k views

Help add ajax load more button

I'm trying to add the plugin "Easy Load More" to my theme (https://wordpress.org/plugins/easy-load-more/). You are supposed to wrap it in <div id="ajax"> and then place <?php ...
1
vote
1answer
2k views

Jetpack Infinite scroll conflicting with theme's pre_get_posts custom posts_per_page

I have the current function on my theme using pre_get_posts, currently right at the bottom of my theme's functions.php file: function mytheme_portfolio_archive_pages( $query ) { if ( is_admin() ||...
1
vote
1answer
125 views

How to add infinite scroll?

My front page is set up so that I have a loop of 3 different rows. On row 1 I have one post, and then on row 2 and 3 I have 3 posts. I repeat this loop twice so I have 14 posts. After 14 posts I ...
1
vote
0answers
165 views

Using infinite scroll ajax load more with search parameter

I have a infinite scroll working on my wordpress site. It works perfectly well on category pages, e.g. example.com/example however it doesnt work when I try to use it on a search page, e.g. ...
1
vote
1answer
518 views

Ajax Infinite Scroll In Custom WP_Query Loop Not Working

I have set up a custom WP_Query loop for a page template. I am implementing an infinite scroll method via ajax, and the call is successful, but for some reason I cannot get the query to like the paged ...
1
vote
1answer
691 views

how to get jetpack's infinite scroll to work with woocommerce?

I am trying to get Jetpkack's infinite scroll to work with the WooCommerce product archive template. I have added the following code to my theme, after installing Jetpack, and I do see the sticky ...
1
vote
0answers
120 views

Changing sort order for presentation by Jetpack infinite scroll

I have been able to use WordPress filters for posts_join_paged, posts_where, and posts_orderby to create a query that presents a set of artists where only artists who have a last name listed in the ...
1
vote
1answer
292 views

Jetpack infinite scroll not working on twentysixteen custom theme

I duplicated twentysixteen theme and only changed the name of the folder and the name of the theme in style.css. I then added in functions.php : function twenty_sixteen_infinite_scroll_init() { ...
1
vote
1answer
1k views

How to create infinte scroll in wordpress for blog and custom post type

How to create infinite scroll in wordpress for blog and custom post type. I have tried jetpack infinite scroll but its not working on custom wordpress page template for custom post type. I looked at ...
1
vote
0answers
288 views

Infinite Scroll and DFP

Well , I'm trying the next loop to make work DFP in an Infinite Scroll. I thought that if I change the name of the Slot I could get the banner shown, so I tried this: <!-- DFP Controller --> ...
1
vote
0answers
102 views

Init plugin again after ajax call finish

We have this website that the navigation between pages work with ajax. in the blog page we use this great plugin to make the ajax load-more posts. all works great but the problem is that when you ...
1
vote
0answers
1k views

'Lazy loading' list of posts with pagination

I have reading settings set to show 30 posts per page, and what I'd like to do is show half of the list of posts and then 'lazy load' the remaining half on scroll. I've checked out some the available ...
1
vote
0answers
346 views

infinite-scroll for 2 fixed height containers

I have 2 fixed height columns for 2 different post-types. The goal is to get the infinite-scroll to work in both containers. I know that the JetPack infinite-scroll container parameter uses ID value ...
1
vote
0answers
230 views

How to prepare the back button action to deal with infinite scroll?

Unfortunately my question is not fixing or understanding code. I have a problem with infinite scrolling, where the user can scrolldown x far, click on xStory and enter a new page. Then naturally hit ...
1
vote
0answers
658 views

Infinite Scroll on a loop?

I have a home page with four different loops (different category's) On one of the loops I want it to display five posts but also have the infinite scroll on it. I have installed the infinite scroll ...
0
votes
1answer
173 views

infinite scroll not working when logged out

The problem: infinite loop works only when the user is logged and then it shows posts that were not published yet. Once I log out, the infinite scroll doesn't work anymore. The setup: I have the ...
0
votes
4answers
5k views

Pagination on Single Post

I'm looking to set up pagination on my single.php file so I can have my infinite scroll function correctly. I know that pagination can be put on a single post but I somehow need to make the single.php ...
0
votes
3answers
5k views

Wordpress plugin: render only page content using ajax call

I'm writing a plugins that renders json data from an API request and I need to implement an infinite scroll in a content page. The problem is when I render the content with an ajax call, it renders ...
0
votes
2answers
41 views

Remove Jetpack infinite-wrap

I'm trying to remove the infinite-wrap class jetpack adds to posts with infinite scroll turned on because I want to add infinitely loaded posts to a gridded layout. I found the article here that says ...
0
votes
1answer
386 views

Jetpack Infinite Scroll - changing number of posts

Problem: Unable to change number of posts on Jetpack Infinite Scroll Desired Result: Load 10 posts per infinite scroll instead of default 7 Theme: Twenty Fifteen (Child) Tried: 1) Looking for a ...
0
votes
1answer
843 views

Waypoints + infinite scroll with custom query

I am trying to infinite scroll posts on a wordpress page (called "News"). I have a simple custom query: <?php $args=array( 'post_type' => 'post', 'posts_per_page' =&...
0
votes
1answer
38 views

Pagination, query more pages at once

I'm wondering if it is possible to do such thing on Wordpress, I have an infinite scroll to display my posts, I'm keeping track the pages updating the url: mypage.com/news/?pag=3 and I have a code ...
0
votes
2answers
1k views

Passing PHP Variables to AJAX Loaded Pages

I have a blog that shows 9 blogs posts per page, with each additional page of blog posts automatically added using the Infinite Ajax Scroll plugin. Every time a blog post is successfully queried the ...
0
votes
1answer
2k views

Jetpack Infinite Scroll won't fire [closed]

I have carefully followed the instructions at OttoPress, and read all the documentation at Jetpack.me. I feel like I understand what should work, but for some reason Infinite Scroll is not firing. I ...
0
votes
1answer
370 views

Different page template for paginated content?

Sorry for the basic question, but I can't track down a solution (or maybe it's just hard to search for). I'm creating my own infinite scroll system for a wordpress site I'm working on. For ease of ...
0
votes
1answer
139 views

Turn off auto 301 on archive pages? [closed]

I'm currently using infinite-scroll. The scroll ends when it reaches a 404. For example it will look for category/cars/page/2 category/cars/page/3 etc until it hits a 404. The problem is that ...
0
votes
0answers
58 views

Infinite scroll without plugin using ajax

I've created an infinite scroll without using any plugin to achieve the objective. The problem is that the bootstrap masonry cards grid are loading all the posts cards at the first scroll or will load ...
0
votes
1answer
26 views

On scrolling showing intervesion error in chrome console

When I scroll the page in chrome it show the intervention error. I tried adding various script like window.addEventListener("mousedown,wheel", handleMouseDown, { passive: false}); but unable to fix ...
0
votes
0answers
18 views

Infinite Scroll Post Showing out of sequence and wrapper

Just testing my search results page and saw some weird behavior here https://gnarlington.net/?post_type=photographs&s=san+francisco The last post that loads in from jetpack's infinite scroll ...
0
votes
0answers
13 views

How to decide the next post to load when using infinite scroll?

I want to add infinite scroll. But I do not want to show random posts/latest posts/most viewed post. But I want to show the posts from certain category/tag. How can I do that. I am very naive in ...
0
votes
1answer
99 views

Exclude Post Type from Jetpack Infinite Scroll

I'm using the Underscores theme which comes with the following (very) handy code in inc/jetpack.php add_theme_support( 'infinite-scroll', array( 'container' => 'main', 'render' => '...
0
votes
2answers
519 views

How to count posts in loop with infinite scroll?

on my index.php I display all my posts with infinite scroll. Before the WP loop I added a $counter, which counts up with every post. But if the infinite scroll loads new posts, the counter will be ...
0
votes
0answers
231 views

Infinite scroll doesnt work

Im making my own custom type post page, and I wanted to add a Infinite scroll with http://imakewebthings.com/waypoints/ Im added all from examples, and that doesn't work and on developer console, I ...
0
votes
1answer
341 views

Infinite scroll function for Twenty Seventeen

It doesn't look like the Twenty Seventeen theme supports Infinite Scroll, and adding support doesn't work either if I add the following to functions.php: add_theme_support( 'infinite-scroll', array( ...
0
votes
1answer
101 views

Infinite Scroll

I am trying to add infinite scroll functionality into my Wordpress theme. I started my exploration of infinite scroll in Wordpress by going here and here. My question is, I don't understand the ...
0
votes
0answers
1k views

hide load more button if there are no posts left to display

I added a load more button with the plugin "easy load more" (https://wordpress.org/plugins/easy-load-more/). The button is working perfectly except that it will still show up even if there are no ...
0
votes
0answers
268 views

Jetpack Infinite Scroll Not Working

The infinite scroll works well when I'm on my localhost. It also works when I install my theme to my website to test. But when I install the theme on my client's WP installation, it doesn't work any ...
0
votes
1answer
121 views

Call full image url instead of stylsheet directory url in JS for Infinite Scroll Function

Can`t figure out how to call the gif image with a full url (for example: http:// urltoimage .com/test.gif) instead of the stylsheet directory url (obj_test.stylesheet_directory_uri + '/img/ajax-loader....
0
votes
2answers
482 views

Problem with infinite scroll on multisite with custom query

I have a WordPress Multisite that uses a special query that combines all the posts on the network and uses the main site to display all posts in the network. Anyway, I would like to have my site use ...
0
votes
1answer
545 views

Load next post by ID on a single page

I hope this topic is not duplicated. I see some similar topics but non of them can solve my problem, so I decided to put a new one. Here's the case. I have a single.php post with the defualt ...
0
votes
1answer
284 views

Update Gallery Randomly in every hour with no duplicates?

I need to order by rand with no duplicates and update my galley in every hour on WordPress. Check the code bellow. This is what I want, ( PHP , MySQLi ): <?php include ("connect-sqli....
0
votes
0answers
35 views

Editing the source of a display for posts (to category recent)

I am trying to modify a piece of code that right now just pulls posts that have been selected in admin. The goal is to get rid of that source (I don't want to select posts), and just display posts ...
0
votes
1answer
192 views

Adding unique marketing messages between certain products whilst using isotope/Infinite Scroll

I am currently using WooCommerce to display a list of products using the following loop to enable the post-type "product" be displayed and allow for pagination so I can use Infinite Scroll to smoothly ...