Articles of infinite scroll

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 $postCount variable increases its count by 1. […] <body> <div class=”posts”> <?php $postCount = 0; if ( have_posts() ) : […]

Jetpack Infinite Scroll won't fire

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 have installed Jetpack onto my WordPress installation and disabled all features apart from Infinite Scroll. I created a content.php, as per the […]

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 like that: if(isset($_GET[‘pag’])) { $paged = $_GET[‘pag’]; } else { $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; }; $args = […]

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’ => 4, ‘ignore_sticky_posts’ => true, ‘post_status’ => ‘publish’, ‘orderby’ => ‘date’, ‘paged’ => $paged ); $wp_query = new WP_Query($args); ?> <?php if ( $wp_query->have_posts() ) : ?> <div class=”infinite-container”> <?php […]

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 all the page instead. This is what I have done so far: function enable_pagination() { jQuery(function($) { […]

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 page be able to have an appended variable on the URL. What I mean is if I […]

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 load_more_button(); ?> where you want the load more button to go. I can’t quite figure out the correct places to add this code (as you can see by my […]

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 following custom infinite loop function: add_action(‘wp_ajax_zephyr_infinite_scroll’, ‘zephyr_get_nextpage’); function zephyr_get_nextpage() { $loopFile = $_POST[‘loop_file’]; $paged = $_POST[‘page_no’]; $vv = stripslashes($_POST[‘vars’]); […]

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 plugin but for the life of me I can’t get it to work. Here is my code for […]

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 back, and expect to return to x, but in my case users are returned to the “bottom”, which is the height […]