Jump to content


Photo
CatLoop

How to set # of most recent posts for Catloop



Best Answer tandan , 19 April 2013 - 01:01 PM

Worked like a charm. Thanks again! 

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 tandan

tandan

    Super Member

  • Members


  • 152 posts
  • LocationNew York
  • Country: Country Flag

Posted 18 April 2013 - 08:07 PM

hi there, I have installed catloop in content area and would like to set a limit to how many display. Right now it paginates but this could get pretty long. Please advise how I can set this limit. 

thank you!



#2 anthalis

anthalis

    Advanced Member

  • Members

  • 60 posts
  • Framework Version:Dev. Latest. Always.
  • Country: Country Flag

Posted 18 April 2013 - 09:28 PM

Hi,

 

 

Setting a number of recent posts for CatLoop while also using pagination is not possible at this time because of some WordPress limitations. There are methods to limit the number of posts returned by a query, but none of them work with query_posts used by CatLoop. 

 

get_posts has a misleading parameter "numberposts", which sounds like it would limit the posts returned, but, in effect "numberposts" and "posts_per_page", which is used in CatLoop, are interchangeable. 

 

 

A painless way to reduce the number of pages showed in pagination is by using the WP-PageNavi plugin.

  • in CatLoop settings, uncheck the box that makes CatLoop show its own pagination.
  • go to PageLines > Drag & Drop and pull Page/Post Pagination right under CatLoop. You now get Next / Previous Post links.
  • install the WP-PageNavi plugin, which will replace the Previous/Next with numbered pages. 
  • under Settings > Pagenavi, configure the text for the various pagination elements ( 3/150 instead of Page 3 of 150). You can also configure how many low-number and high-number pages to show. 

 

On this site http://enachele.com/ at the bottom, the yellow pagination is set to show:

  • Number of pages to show: 3 
  • Number Of Larger Page Numbers To Show: 2
  • Show Larger Page Numbers In Multiples Of: 5 

 

Let me know if you need further assistance. 


  • Jenny likes this

#3 tandan

tandan

    Super Member

  • Members


  • 152 posts
  • LocationNew York
  • Country: Country Flag

Posted 19 April 2013 - 12:42 PM

Hi there! thanks so much! I'm looking forward to trying out that solution. Thanks for the tip! :) Will keep you posted if I have questions...



#4 tandan

tandan

    Super Member

  • Members


  • 152 posts
  • LocationNew York
  • Country: Country Flag

Posted 19 April 2013 - 01:01 PM   Best Answer

Worked like a charm. Thanks again! 



#5 anthalis

anthalis

    Advanced Member

  • Members

  • 60 posts
  • Framework Version:Dev. Latest. Always.
  • Country: Country Flag

Posted 20 April 2013 - 04:35 PM

You're very welcome :) 







Also tagged with one or more of these keywords: CatLoop