randyhoyt
Member
Posted 5 months ago #
It would be great if the number of results returned by a shortcode could be limited. The WordPress get_posts() function has a parameter that works like this, numberposts. I would imagine the shortcode looking something like this:
[project id=1 results=4]
To achieve this right now, I have written a custom template called "table-four-results.php" that only outputs the first four results, but it would be good if this could be abstracted out to the shortcode.
http://wordpress.org/extend/plugins/projectmanager/
Should the limit only display 4 datasets and that's all, or include a pagination, so just change the number of objects per page?
randyhoyt
Member
Posted 5 months ago #
Just four datasets and that's all.
I've implemented the shortcode attributes as you suggested, except that you specifcy formfields only with its ID (second example).
[project id=ID results=3]
[project id=ID form_id=12 form_value='Hello']
[project id=ID orderby=rand results=3]