WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content Type Manager
Data Output is "Array" (3 posts)

  1. rolcau
    Member
    Posted 1 year ago #

    Hi,

    First: Great Plugin and very well documented!!

    I made my first custom post types with custom fields and everything worked fine. I made a template for the output (single-partner.php) and also this worked well.

    But then in the preview of the new entry, the data looks like this:

    Adresse: Array (Array comes instead of the given address...)

    Tried with different Themes (thought this could be a bug from my custom theme), but everytime the same output: Array

    Any Answers for this?? (Made on my local server a new clean WordPress installation with new Mysql Table, but everytime the same... :o(

    Many thnks for answers and solutions!!

    Cheers, Roland

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

  2. rolcau
    Member
    Posted 1 year ago #

    Hi, me again...

    Found the reason now, but cannot explain:
    I set the output of the custom field to default, and then the output is: Array
    With the output filter set to none (raw), the data is display right...

    Can anyone explain, why this is??

    Many thnx, Roland

  3. fireproofsocks
    Member
    Plugin Author

    Posted 1 year ago #

    If you created your field to be "repeatable" then you store an ARRAY of values, not a single value. So if you have an array, you need to iterate over each item in it. You can use the "formatted_list" filter (as one example) as a convenience function for retrieving all that data:
    http://code.google.com/p/wordpress-custom-content-type-manager/wiki/formatted_list_OutputFilter

    Or if you only need one value in your field (instead of an array), edit your field definition so it stores only a single value (uncheck the "repeatable" option).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic