Contributors: beaver6813, dirkhaim, paul.irish, benbalter
Donate link: http://www.infinite-scroll.com
Tags: ajax, pagination, scrolling, scroll, endless, reading
Requires at least: 3.2
Tested up to: 3.4
Stable tag: 2.0b
Automatically append the next page of posts (via AJAX) to your page when a user scrolls to the bottom.
Infinite scroll has been called autopagerize, unpaginate, endless pages. But essentially it is pre-fetching content from a subsequent page and adding it directly to the user’s current page.
When a user scrolls towards the bottom of the page, the next page of posts is automatically retrieved and appended. This means they never need to click "Next Page", which dramatically increases stickiness.
Features:
- Works out-of-the-box for many popular WordPress themes -- just activate the plugin and scroll
- Fully customizable to adapt to your site and theme
- Requires no (hopefully) template hacking, only a knowledge of CSS selectors.
- Relies on shared database of common themes to simplify installation process
- Maintain local database of theme presets for all installed themes (shared across network on multisite installs)
- Countless API endpoints to modify the behavior.
- Backwards compatible: Will not break RSS readers, mobile devices, or browsers with javascript
Full information on infinite-scroll.com
- Plugin completely rewritten from the bottom up
- Note: you will need to manually reactivate this plugin after upgrading
- Minimum WordPress version required now to 3.2
- Added support for internationalization (see FAQ for information on translating)
- Added support for custom post types (now works on all pages but
is_singular()
) - Options screens significantly simplified with additional help text
- Presets screen now uses standard WordPress administrative interface
- Ability to submit your theme's CSS Selectors to the community CSS selector database to aid others with installation
- Changes to presets are now made inline; saved via AJAX without page reload
- Added additional API endpoints for developers to modify and customize plugin behavior
- Loading image now uses native WordPress uploader and can accept arbitrary URL or image from media gallery
- Loading and finished text now uses native WordPress TinyMCE editor
- If site administrator has not entered CSS selectors and preset is known, plugin will default to preset
- Any preset entered by site (or network) administrator will now override community contributed presets by default
- Community contributed CSS selector presets are now stored in the database allowing for plugin directory to be unwritable (security enhancement)
- Prompts users to default to CSS selector preset when available
- Presets now support child themes
- Community contributed CSS selected asynchronously update daily (performance enhancement)
- Site (or network) specific CSS selector presets are now stored in the database (security enhancement)
- CSS Preset updater now uses WP_HTTP class (compatibility enhancement)
- Javascript file now served directly to user (rather than proxied via PHP) to allow for browser caching, minification, serving via CDN, and better integration with caching plugins (performance enhancement)
- Javascript options stored natively in database and passed directly to script via WordPress's
wp_localize_script
function (performance and customizability enhancement) - No longer relies on deprecated user levels to determine permissions
- Default loading and fished messages changed
- Fixes for error and warnings when run with
WP_DEBUG
enabled - Removed prompt for option to activate infinite scrolling for only certain users (defaults to all)
- Removed prompt for option to toggle debug mode (defaults to
WP_DEBUG
orSCRIPT_DEBUG
) - Removed prompt for option to toggle scrolling behavior (defaults to automatic)
- Removed prompt for additional callbacks
- Removed prompt to select image alignment (defaults to left, can override via CSS)
- Significant code clean up, file reorganization, and in-line documentation to conform to WordPress coding and style standards (whitespace, double v. single quotes, tab drift, trailing commas, closing PHP tags, etc.)
- Classes loaded as sub-classes (rather than extending parent class) to prevent classes from becoming out of sync
- Added phpdoc style documentation
- Plugin file name changed to conform to standard WordPress naming conventions
- License (GPL) included with distribution
- Version numbering simplified
- Added infinite_scroll_load_override filter to manually force infinite-scroll to load on a page.
- Thanks to https://github.com/samargulies for the above patch.
- Updated preset DB with basic themes
- Made a few fixes in options/presets to prep for main release.
- Changed hook used by 404 detection to template_redirect from wp.
- Removed registration/enqueuing script in favor of just enqueueing
- Fixed bug/typo in compressed init script
- Converted options pages to use Settings API
- Added behavior selection (Manual triggering)
- Completely revamped admin panel adding more modular management
- Added ability to center loading image
- Added WYSIWYG editor to HTML allowed fields in admin panel
- Updated Javascript callback to pass DOM for new elements added
- Added Preset manager
- Added ability to auto-fill selector fields from theme preset
- Overhaul of underlying code, separating out into classes to cut down on code processed (and hence load time) for the end-user.
- Improved escaping on settings to allow greater flexibility.
- Fixed issue with jQuery not loading if WP version is up to date.
- Fixed issue with plugin showing twice on plugin list.
- Moved init script from direct page insertion to separate script.
- Cleaned up unneeded declared constants.
- Combined init script and library into one minified script.
- This fixes an incompatibility with HeadJS plugin.
- Fixed multiple jQuery loaded conflicts.
- Now uses standard WordPress javascript insertion.
- Loads locally stored jQuery 1.6.2 if current version is < 1.6 this can only be detected through WordPress now, hence the fix for multiple versions conflicting (some naughty themes don't use WordPress's javascript loading).
- FIX: Default options not being recursively copied.
- Updated to new options layout.
- Callback fix.
- HTTPS loading image fix.
- Better debug support (switches between minified and non).
- Callback (custom javascript) fix.
- IE9 binding bug fix.
- Modified the method used to determine the link paths (bug fix)
- Updated core javascript to version 2.0b2.110617 (full revamp).
- General cleanup/tidy of plugin itself.
- Fixed bugs with numerical sub-domains (now uses site_url to determine path).
- Supports archives, tags, searches.
- Wider theme support.
- Simplified plugin options page, added loading image upload ability, added option for debug mode.
- Removed annoying reminder that showed on all admin pages.
- Forces 404 header when no more posts are available.
- New appending technique using document fragments.
- Callback receives the contentSelector elem as its first argument, and an array of the new elements as the second argument
Fixed small bug that jQuery 1.4 introduced.
Proper WordPress method (enqueue_script) removed because it just breaks too often JS updated with some custom method action.
Use proper WordPress function to register the javascript Use plugins_url to determine plugin url
- 2009 August 4th
get_option('siteurl')
fix made.- jQuery plugin version updated. many more options available.
- Release backwards compatible
- 2008 September 25
- JavaScript rewritten as a proper jQuery plugin.
- Added animation
- June 29 - 1.0 release.
Essentially it is pre-fetching content from a subsequent page and adding it directly to the user’s current page. More Information
Yes. Go to Settings -> Reading in your WordPress administrative dashboard.
Add the following to your theme's css: #infscr-loading img { text-align: ALIGNMENT; }
where "ALIGNMENT" is either left
, right
, or center
.
Add a filter to infinite_scroll_options
and adds additional options to the options array.
If you enjoy the plugin and are interested in contributing a translation (it's super easy), please take a look at the Translating WordPress page.
Yes all enhancements are made via javascript only, so search spiders see no difference.
Things won’t change for screen-readers. This technique degrades gracefully.
Infinite scroll is configured to die when it hits a 404 Not Found status code, so when it goes through all your archives it should hit a /page/43/ (or something) that doesn’t exist, then show a message "Congrats, you’ve reached the end of the internet." Some WordPress themes don’t report not found pages with a 404. Try a different theme or contacting the theme author.
Probably not, nope.
- Login to your WordPress site as an Administrator
- Navigate to Plugins->Add New from the menu on the left
- Search for "Infinite Scroll"
- Click "Install"
- Click "Activate Now"
- Download the plugin from the link in the top left corner
- Unzip the file, and upload the resulting "infinite-scroll" folder to your "/wp-content/plugins directory" as "/wp-content/plugins/infinite-scroll"
- Log into your WordPress install as an administrator, and navigate to the plugins screen from the left-hand menu
- Activate Infinite Scroll