mandiwise / isotope-posts

[RETIRED] This plugin allows you to use Metafizzy's Isotope javascript plugin to display feeds of WordPress posts with a simple shortcode. Works with custom post types and custom taxonomies too.
GNU General Public License v2.0
55 stars 17 forks source link

Limit Numbers of Posts #7

Closed mungle closed 10 years ago

mungle commented 10 years ago

Sorry I'm not an expert...

How to limit the number of posts displayed in a page and download the others scrolling down?

Also: I've limited the words in the excerpt and I wanted to add in your code but users need to hack the function.php in theme folder to achieve this... If you know an other hack will be appreciated.

mandiwise commented 10 years ago

I haven't incorporated pagination or infinite scrolling into this plugin. I did fork a version of this for a client project that incorporated pagination but that opened up a number of difficult issues related to usability and I haven't decided how to (or if I even should) incorporate that into the public version of this plugin as an option.

There's documentation about how to incorporate infinite scroll on the Isotope plugin site if your interested in taking a shot at it: http://isotope.metafizzy.co/v1/demos/infinite-scroll.html

However, if you would simply like to restrict the number of posts that display (rather than showing all of them), you would edit line 125 of isotope-posts.php:

'posts_per_page' => '-1'

You can change the "-1" to whatever number you would like to display. The -1 just tells wp query to show all of the posts. But remember, there will be no pagination.