Genesis Themes

  • Home
  • Genesis Tutorials
  • WP Tutorial
  • Twenty Fifteen Theme
  • Social Media
  • WP Plugins

How to Add Infinite Scroll to WordPress Without Plugin

Add Infinite Scroll to WordPress Theme

Like Twitter, enable infinite scroll to your WordPress theme with jetpack plugin.This plugin having plenty of modules,unlike all modules infinite scroll not support for some themes.Now this issue fixed in jetpack,it's working perfectly in default WordPress themes and as well as all premium themes/frameworks.

Infinite Scroll to Well crafted WordPress Themes

What is well crafted WordPress themes really means ?, According to jetpack , default wordpress themes are well crafted themes.These themes supports infinite scrolling in your blog.it's very easy to enable infinite scrolling in that themes.

To add  infinite scroll to WordPress themes like twenty twelve,twenty thirteen,twenty fourteen paste the following code to your functions.php file.

add_theme_support( 'infinite-scroll', array(
'container' => 'content',
'footer' => 'page',
) );

Infinite Scroll to unsupported WordPress themes

By default some WordPress themes doesn't support infinite scrolling.Adding this infinite scrolling makes tricky but possible.Copy and paste the following code to your wordpress themes's functions.php file.

function mytheme_infinite_scroll_init() {
add_theme_support( 'infinite-scroll', array(
'container' => 'content',
'render' => 'mytheme_infinite_scroll_render',
'footer' => 'wrapper',
) );
}
add_action( 'init', 'rootdip_infinite_scroll_init' );

Still it's not over,you need to setup Function for the Render Parameter. mytheme_infinite_scroll_init uses the WordPress loop to load additional posts for infinite scrolling.Add the below code to your themes's functions.php file.

function rootdip_infinite_scroll_render() {
get_template_part( 'loop' );
}

Adding infinite scrolling in WordPress themes is very easy with jetpack module.Need not to worry about supported and unsupported WordPress theme.

Getting error in wordpress or Jetpack infinite scroll still not working on your website.Consider using a infinite scroll WordPress plugin,which automatically append the next page of posts (via AJAX) to your page when a user scrolls to the bottom.

Related Posts

  • How to Add WordPress Pagination Without a Plugin
  • How to No follow External Links in WordPress
  • Display WordPress Popular Posts by Comments Count
  • Inline Small CSS To Speed Up Your Website
  • How to Add Expires Headers in WordPress
  • How to Enable Gzip Compression in WordPress
  • How to Add Related Posts with Thumbnails in WordPress
  • How to Add Logo to Twenty Fourteen Theme
  • Best Way to Defer Parsing of JavaScript in WordPress
  • Speed Up Your WordPress Cache Without Plugins

Bluehost and Siteground Coupons for January 2016.

Best Premium WordPress Themes from TemplateMonster
download wordpress themes from MonsterOne

Categories

  • Blog
  • Blogger
  • Genesis Tutorials
  • Social Media
  • Top Websites
  • Twenty Fifteen WordPress Theme
  • WordPress Plugins
  • WordPress Tutorial