WordPress.org

Forums

Pods - Custom Content Types and Fields
[resolved] Question about pagination (3 posts)

  1. senyoraangelica
    Member
    Posted 1 year ago #

    Hello! Is there a way to echo the number of items in a pagination page relative to the total number of results found?

    e.g. Page 3, showing 31-45 items of 300 found.

    In this case, showing the page number and the total number of results is easy. However, I couldn't figure out the right code to echo out "31-45" mentioned above.

    I've been diligently looking at the codes in the documentation section but couldn't figure how to make this work.

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

  2. senyoraangelica
    Member
    Posted 1 year ago #

    Another very related question...

    Instead of page numbers in the pagination, is there a way to show the actual number of items in a pagination page relative to the total number of results found?

    e.g.
    << First < Previous 1-10 11-20 21-30 31-37 Next > Last >>

  3. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 1 year ago #

    No, this is currently not possible with our code, but you could request the feature.

    For now, you can run your $pod->find(), and utilize the $pod->page variable to know what page you're on, $pod->total() to know how many items are on the current page, and $pod->total_found() to know how many results total were found in the DB (across all pages)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags