Giter VIP home page Giter VIP logo

wordpress-ajax-load-more-posts's Introduction

WordPress Ajax load more posts

Description

A WordPress plugin to load more posts via ajax.

  • This plugin overwrites the get_the_posts_navigation function. So you don't need any shortcodes.
  • This plugins uses no dependencies, is translatable and WPML ready.
  • The default previous and next links that are generated via get_the_posts_navigation keep available for visitors with JavaScript disabled.

This plugin just grabs the next page url, makes an Ajax request to that url and parses it. Therefore you don't need to worry if your theme templates and functionality gets used. What works for a browser request, works for the ajax request. The new posts get inserted to a container with the class posts. Make sure you have that class on your container or overwrite the selector via the load-more-posts-js-vars filter

Motivation

I build a lot of sites that needed a functionality like this and decided to create a plugin for it. Although there are a lot of plugins doing something like this, they usually add a lot of bloat and are not developer friendly. This plugin is for a developer easier to implement, easier to edit and keeps te codebase cleaner.

Installation

Clone this repo to your plugins or mu-plugins folder. When you load it in your mu-plugins folder, you have to call the plugin via a file that is directly in the mu-plugins folder. See this article for more information.

License

GNU GENERAL PUBLIC LICENSE

wordpress-ajax-load-more-posts's People

Contributors

robbertdk avatar

Stargazers

T. Sreenivasulu avatar Sunny avatar krystyna avatar Huub avatar Jayesh Patel avatar

Watchers

James Cloos avatar  avatar Huub avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.