weDevsOfficial / wedocs-plugin

A documentation plugin for WordPress
https://wordpress.org/plugins/wedocs/
GNU General Public License v2.0
194 stars 94 forks source link

Add new shortcode attribute to limit no. of items shown #59

Closed Joel-James closed 6 years ago

Joel-James commented 6 years ago

Having one attribute to limit no. of items shown under a section is a good idea. Because if one section has 10 docs and another section has 3, that doesn't look good (http://www.clipular.com/c/4600533885911040.png?k=SLjoisnTJ2GYw0gHKpN7z3pdmtU). If we can limit maximum items shown to 3, the UI wise, that will look good.

Asgaros commented 6 years ago

This - or some global option in the settings - would be very useful. Hope it gets implemented into the core of the plugin soon!

tareq1988 commented 6 years ago

As the default posts_per_page in WP_Query is 10, setting it to -1 would be change of default behaviour on how it's handled right now. Changing the items to 10 would be nice and will be ready for merge.

Thanks for the pull request 👍

Joel-James commented 6 years ago

@tareq1988 done :+1: