Forums

[Plugin: ProjectManager] Feature Request: Return results with certain value in ANY field (not just c (4 posts)

  1. randyhoyt
    Member
    Posted 2 years ago #

    Currently, the shortcodes have a way to specify a particular category (e.g., cat_id=4) that can be used to filter the results. It would be great if any field could be used in this manner. The WordPress get_posts() function has two parameters that work like this, meta_key and meta_value.

    $meta_key and $meta_value
    (string) (optional) Only show posts that contain a meta (custom) field with this key and value. Both parameters must be defined, or neither will work.
    -- http://codex.wordpress.org/Template_Tags/get_posts

    It would be great to be able to use the shortcode like this:

    [project id=1 field_id="formfields-2" field_value="2009"]

    http://wordpress.org/extend/plugins/projectmanager/

  2. hept27
    Member
    Posted 2 years ago #

    great suggestion. I'll 2nd that!

  3. randyhoyt
    Member
    Posted 2 years ago #

    @hept27, I'm pretty sure that this feature has been added to the plugin since version 2.6. The changelog has this note:

    2.6
    ----
    NEW: shortcode attribute to get datasets with specific meta key and meta value

  4. RunningSocks
    Member
    Posted 2 years ago #

    Yes, this works also on my page. but it seems absolutly necessary to place the shortcodes "field_id" and "field_value" at the end of all shortcodes. another order will not work on my WP Installation
    e.g. this works:
    [project id=15 template=table orderby=formfields-136 order=asc field_id=140 field_value="Test"]

    e.g. this works not:
    [project id=15 field_id=140 field_value="Test" template=table orderby=formfields-136 order=asc]

    WP: 2.9.2
    Projectmanager: 2.9.4

Topic Closed

This topic has been closed to new replies.

About this Topic