WordPress.org

Forums

Pods - Custom Content Types and Fields
[resolved] upping the limit of 15 (3 posts)

  1. igloobob
    Member
    Posted 1 year ago #

    Hi,

    I'm having trouble editing the code (see link below) to change the limit to unlimited or at least more than the 15 I'm told is the default limit.

    http://pastebin.com/Q6PJnNx9

    Scott pointed me in the direction of using the limit parameter but I'm not sure what I'm doing here, I've tried a few different times and it doesn't work so I'm obviously doing ti wrong. Can anyone please help me out with how to amend this code?

    "The default limit is 15, to override this, use the ‘limit’ parameter in find() http://staging.pods.io/docs/code/pods/find/

    Thanks!

    http://wordpress.org/extend/plugins/pods/

  2. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 1 year ago #

    Consider switching to the updated Pods 2.x syntax found here:

    http://staging.pods.io/docs/comparisons/compare-functionality-in-pods-1-x-to-pods-2-0/

    The line that I was referencing the 'limit' parameter, was this one:

    $team->findRecords('displayorder ASC');

    It should be:

    $team->findRecords( array( 'orderby' => 't.displayorder ASC', 'limit' => -1 ) );

    -1 will return all items, or you can put another number that you want to limit to. The default value is 'limit' => 15

  3. igloobob
    Member
    Posted 1 year ago #

    Hi Scott,

    that's great thanks very much. I'll read up on the new syntax.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.