WHAT IS AUTO LOAD NEXT POST?
It simply automatically loads the next post on your blog once the user has reached the bottom of the initial post the viewer is reading and repeats the process as the user reads your content until there are no more posts to load.
Source: https://wordpress.org/plugins/auto-load-next-post/
In this tutorial I am showing you how you will implement this plugin with your own Genesis Child theme. By default plugin is not supporting the Genesis framework. I did some custom work and it is working like a charm.
At first you will install and activate the plugin (https://wordpress.org/plugins/auto-load-next-post/)
- Login to your Dashboard
- Navigate to Plugins -> Add New
- Search the plugin “WordPress Infinite Scroll by Auto Load Next Post”
- It will show at first. Click on the Install button
- Later click on the “Activate” button
After activating the plugin you will go here “Settings -> Auto Load Next Post” page and setup the form like the attached screenshot
Ok…
Next step is that you will open your functions.php file and add the following snippet at end of the site. If you already added the previous/next post link on your single page, you will delete that code from your child theme file.
1 2 3 4 5 6 7 8 |
add_action( 'genesis_after_content', 'paul_load_next_navigation', 1, 10); function paul_load_next_navigation() { if( ! is_singular('post') ) { return; } auto_load_next_post_navigation(); } |
This the final step. You will create a new folder “auto-load-next-post” in your child theme. Afterthat you will create a new PHP file “content-partial.php” and save into that folder. This file is containing the following PHP snippets:
1 2 3 4 5 |
<?php genesis_standard_loop(); do_action( 'genesis_after_content' ); |
All done. Now you will check your single post and next post will load automatically when you will scroll the window.
Leave a Reply