WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms Directory
[resolved] Paging is off (7 posts)

  1. new_B
    Member
    Posted 2 years ago #

    Hi,

    I just noticed that the paging option, i.e., "Displaying #-# of #", is off.

    E.g. When it's left at the default 20 entries per page or even explicitly set with page_size="20",

    It only displays 17 entries on the first page but says "Displaying 1-20 of 41".

    On the last page, I have "Displaying 41-41 of 41" and it displays six entries, not one as it says.

    Anybody else having this issue as well and have any suggestions on solving it?

    Thanks in advance.

  2. new_B
    Member
    Posted 2 years ago #

    It appears to be related to having the approved="true" used/set.

  3. new_B
    Member
    Posted 2 years ago #

    Sorry for the duplicate post--didn't realize it submitted twice...

    I fixed it by adding the following condition on line 708 to wrap around the second output of the count, in directory.php:


    <div class="tablenav-pages">
    <?php if($showcount){ ?>
    <span class="displaying-num"><?php printf(__("Displaying %d - %d of %d", "gravityforms"), $first_item_index + 1, ($first_item_index + $page_size) > $lead_count ? $lead_count : $first_item_index + $page_size , $lead_count) ?></span>

    <?php } ?>

    <?php echo $page_links ?>
    ...

  4. new_B
    Member
    Posted 2 years ago #

    Actually...I just realized...this is not the same issue. The above solution refers to http://wordpress.org/support/topic/page-of-displaying-when-set-to-false?replies=1 which is a totally different issue than the above.

  5. new_B
    Member
    Posted 2 years ago #

    Regarding the following original issue above; i.e.,

    I just noticed that the paging option, i.e., "Displaying #-# of #", is off.

    E.g. When it's left at the default 20 entries per page or even explicitly set with page_size="20", etc.

    I tested it further and it appears that it's not the "Displaying #-# of #" that's the problem but the actual number of records being displayed. *Note: the directory only shows approved listings.

    E.g.

    - Paging is set to three records per page shown
    - There are five records in total
    - There are five records, "A", "B", "C", "D", and "E"

    - When all of the records are approved, the paging is correct and the result is the following:
    -- page 1 shows A-C AND "Displaying 1-3 of 5"
    -- page 2 displays D-E AND "Displaying 4-5 of 5"

    - However, when record "C" is disapproved the following is the result, which is incorrect:
    -- page 1 shows A-B AND "Displaying 1-3 of 5"
    -- page 2 shows D-E AND "Displaying 4-5 of 5"

    Thanks in advance.

  6. Zack Katz
    Member
    Plugin Author

    Posted 2 years ago #

    Hi new_B - I'm in the middle of a major revamp, and will have this fixed in that release. Thanks for your testing.

    I have been able to fix the incorrect approved count issue (which you described well above).

  7. Zack Katz
    Member
    Plugin Author

    Posted 2 years ago #

    This is fixed in Version 3.0 - just released!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic