Skip Navigation

[Resolved] Increase Display Limit

This thread is resolved. Here is a description of the problem and solution.

Problem:
Increase Display Limit

Solution:
You can use the view's filter hook "wpv_view_settings" to modify the default view settings.

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/increase-display-limit/#post-1164538

Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_view_settings

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by Line49 Design 5 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1163123
limit.JPG

Tell us what you are trying to do? I need to be able to display more than 50 posts at a time, but less than unlimited. I would like to be able to display 100 or 200 or some number of posts in my view. Is there code that I can put in the View to do that or a hook/filter to change the limit or selection box?

Is there any documentation that you are following? No

Is there a similar example that we can see? No

What is the link to your site? hidden link

#1163499

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I assume you want to paginate your view. Could you please create the paginated view or enable "Pagination and Sliders Settings" section by clicking on "Screen Options" button at top right of your view's page and set your pagination settings accordingly.

More info:
=> https://toolset.com/documentation/user-guides/views-pagination/
=> https://toolset.com/documentation/beyond-the-basics/paginate-lists-of-content/

If you do not want to paginate your result then, yes, you should use the "Limit" section to limit the number of records you want to display.

#1163960

Hi,
This is a map only view, there is no pagination needed.

The problem is that the Limit section dropdown only goes to 50. I need to show more than 50 items, more like 100 or 200 items. Is there a way to do that? Can the Limit dropdown be overridden to make it a larger number?

Thank you for you help.

#1164538

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - Views offer a filter hook using which you can override the view's settings.

You can use view's filter hook wpv_view_settings

For example:

//Modify the limit and/or offset settings of a given View to use a number greater than 50:
add_filter( 'wpv_view_settings', 'func_modify_post_limit', 5, 2 ); // use a low priority number of 5, so this runs early
function func_modify_post_limit( $view_settings, $view_id ) {
    if ( $view_id == 9999  ) { // if displaying a View with ID equal to 9999
        $view_settings['limit'] = 100; // show 700 posts
       
    }
    return $view_settings;
}

Where:
- Replace 9999 with your original view ID.

More info:
=> https://toolset.com/documentation/programmer-reference/views-filters/#wpv_view_settings

#1166442

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.