Support » Plugin: Custom Content Type Manager » [Plugin: Custom Content Type Manager] Data Output is "Array"

  • rolcau



    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • rolcau


    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

    Plugin Contributor fireproofsocks


    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:

    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).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Custom Content Type Manager] Data Output is "Array"’ is closed to new replies.