WordPress.org

Support

Support » Plugins and Hacks » Custom Content Type Manager » [Plugin: Custom Content Type Manager] summariz post shortcodes to list out array

[Plugin: Custom Content Type Manager] summariz post shortcodes to list out array

  • I have a multi-select field called “locations” with two options, Bloomington and Pekin.

    When I use the summarize_post short codes, I put this in the post:

    Location: [+locations+]

    The output looks like this:

    Location: [“Bloomington”,”Pekin”]

    How do I get rid of the []’s and quotes? I’ve tried changing the output filter on the field, with no difference. I’ve looked at the documentation but I’m misssing something somewhere.

    http://wordpress.org/extend/plugins/custom-content-type-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • I promise I have looked at the documentation, the codex and I must not be using the right terminology to search. If anyone can point me in the direction I’d be grateful. Thanks.

    Plugin Contributor fireproofsocks

    @fireproofsocks

    Multi-select fields (or any repeatable fields) store a list of values as a JSON array (for the geeky discussion about why I structured it this way, you can read this: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/CustomFieldsDataStructure)

    The Summarize Posts shortcode is limited in that you can’t easily operate on the values — if you do this via PHP in your template file, you’ll have a lot more flexibility.

    The 0.9.6.1 version (currently on the dev branch) does support advanced placeholders that let you use output filters in just this type of scenario. E.g. instead of just using [+locations+], you can operate on that value via an output filter, e.g. [+locations: formatted_list +]

    That functionality is currently in the dev version: http://downloads.wordpress.org/plugin/custom-content-type-manager.zip — it’s stable, but I haven’t released it yet because I haven’t finished all the documentation yet.

    Thanks for the response,I appreciate it. I’ll give the dev branch version a try.

    Not sure where to post this, but I got this error when using your dev version:

    Parse error: syntax error, unexpected ‘}’ in C:\Users\Pam\Documents\Websites\prairieland.dev\wp-content\plugins\custom-content-type-manager\includes\functions.php on line 123

    Dreamweaver flags it as well.

    Sorry, I didn’t specify when the error occures:
    When I activate the plugin, I get this:

    Parse error: syntax error, unexpected ‘}’ in C:\Users\Pam\Documents\Websites\prairieland.dev\wp-content\plugins\custom-content-type-manager\includes\functions.php on line 123

    Plugin Contributor fireproofsocks

    @fireproofsocks

    Line 122 is missing a semi-colon:

    return $data['custom_field_defs'][$fieldname];

    Committed revision 588030.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Custom Content Type Manager] summariz post shortcodes to list out array’ is closed to new replies.
Skip to toolbar