WordPress.org

Support

Support » Plugins and Hacks » [Plugin: ProjectManager] Feature Request: Limit number of results returned

[Plugin: ProjectManager] Feature Request: Limit number of results returned

  • randyhoyt
    Member

    @randyhoyt

    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Kolja
    Participant

    @koelle

    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

    @randyhoyt

    Just four datasets and that’s all.

    Kolja
    Participant

    @koelle

    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]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: ProjectManager] Feature Request: Limit number of results returned’ is closed to new replies.