Paginating Results

This parameter is specially useful if you want to display a lot of posts, Single Latest Posts uses jQuery to “ajaxify” the pagination behavior. Nonetheless, if JavaScript has been disabled then the pagination will work as usual (loading each page individually).

It’s also important to note the pagination parameter should be used in combination with the instance identifier to avoid unexpected results when using multiple paginated shortcodes within the same page, as well as the posts_per_page parameter to specify the number of posts to be displayed per page, if this parameter is not specified, the pagination won’t work.

Shortcodes:


[slposts paginate=true posts_per_page=4] // Activates pagination and display 4 posts per page
[slposts paginate=true
         posts_per_page=4
         instance=sports
         category=sports
] // Displays posts under category sports and sets instance identifier to sports
[slposts paginate=true
         posts_per_page=4
         instance=technology
         category=technology
] // Displays posts under category technology and both work
  // in the same page because identifiers are different

  • http://www.cheekychickblog.com/ The Cheeky Chick

    Hi there,

    Is there any way to remove the “next page” feature that shows at the top right or left of the container? I’ve tried removing/hiding it with CSS, but it still is there, and in the middle of a sidebar widget. Thanks so much :-)

    Jen

    • http://laelite.info/ L’Elite

      Hello Jen,

      Do you want to keep pagination but hide the “next page” link? If so, then some CSS can do the trick, I’ve modified the original CSS file to hide previous and next buttons from the widget, just download the file from this link: https://gist.github.com/laelitenetwork/7322511 (it will download in a compressed file, uncompress and save it to your active WordPress theme folder -where style.css is found-) then set the “Custom CSS Filename” to slpwidget-pagination, delete your sites’ cache (if you’re are using a plugin like WP-Cache) and clean your browser’s cache then refresh and that’s it.

      If there’s anything else I can help you with, or it doesn’t work as expected please let me know.

      Cheers,
      José Luis.

      • http://www.cheekychickblog.com/ The Cheeky Chick

        Hi again. Thanks so much for the fast response :-) Unfortunately I’m tech-challenged, and don’t know how to upload files into my theme folder. I don’t even know where the theme folder is, as Pagelines has its own area to enter CSS code without digging into the template or theme files. Would I be able to use the CSS there, without uploading anything?