Skip Navigation

[Resuelto] Increase Display Limit

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 5 años, 11 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: ,

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por Line49 Design hace 5 años, 11 meses.

Asistido por: Minesh.

Autor
Mensajes
#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? enlace oculto

#1163499

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: 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!