• I just upgraded, and all the places on my custom post type page where custom fields are output show as “Array”.

    Any ideas why this is?

    Also on archive pages, the custom post type entries do not appear.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author XYDAC

    (@deepakseth)

    Can you just Deactivate and Reactivate the Plugin.
    Moreover can you please provide the field type associated with the problem.

    Plugin Author XYDAC

    (@deepakseth)

    Also update the plugin to 1.6.5

    Thread Starter josefdunne

    (@josefdunne)

    I upgraded to 1.6.5 and deactivated and reactivated the plugin, but the same happens. It applies to all fields, the fields are type “text”. You can see the page here, where ever the word Array is there should used to be a value with version 1.5 https://bit.ly/iyBvam

    Thread Starter josefdunne

    (@josefdunne)

    One more thing, I have not touched my template code, but this is what I am using to call the custom field value. get_post_meta($post->ID, 'name', true)

    Plugin Author XYDAC

    (@deepakseth)

    Really glad that u gave the code you used to call custom value, else i would have been annoyed thinking that it was related to my plug in.

    You will need to use my shortcode to get the values from the database, because from this upgrade I am storing everything in an array. All you need to do is replace these calls with the shortcodes. you can add the html script to post type’s template on post type edit page.
    Or you can change the code of your template file and use the function do_shortcode(); for calling off the shortcode.

    Hope you’ll soon solve you problem. And from next time onwards do provide full information before blaming anyone.:)

    Regards,
    -Xydac

    Thread Starter josefdunne

    (@josefdunne)

    So something like this? do_shortcode('[xydac_field]{id}[/xydac_field]') this goes in a function.. making your plugin only use shortcode makes is much more restrictive. My code was set up well, also, it was not 100% clear that you had removed the use ofget_post_meta.

    I may have to move to GD instead. Or revert back to 1.5.

    Thread Starter josefdunne

    (@josefdunne)

    Could you explain where you informed users of your plugin, that you stopped support for get_post_meta? I now have to re-write all my code again. I read your changelog, but nowhere did I see you say “The plugin does not support get_post_meta” I use a lot of if and else statements against a value for get_post_meta now this code has to be re-written.

    Plugin Author XYDAC

    (@deepakseth)

    Hey josefdunne ,
    First off, You are getting a lot angry on me mate for the problem caused to you.
    You shouldn’t be getting so angry coz in the recent updates I have made huge changes worked day and night and delivering such a plugin for free.The problem to me isn’t that my plugin caused a lot of problem for you, the problem is that u don’t know how to solve it, and shouting on me.

    I’ll tell you one this my dear friend, the technology you are working with is PHP and it’s on WordPress. So chill of dude, coz if you don’t like any function the way i do just make a damn change and you are done.

    Now moving to your problem,

    You used get_post_meta($post->ID, 'name', true) to access the custom values, so all you need to do is re-define the function get_post_meta in a file for your use. In that function first you should check for an arrayed value so you don’t bug up any other kind of custom field. If the value is array then the format i use for my custom fields is as below:
    meta_name : {field_name}
    meta value : array({field_type} => {field_value})

    it’s as simple as that.
    I would have actually written the function for you, but i would leave it for you to fight with. It’s your decision to use my plugin or not, even on top of my plugin file says, the software come without warranty. so my dear friend..Enjoy…!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Upgrading from 1.5 to 1.6.3 has broken my site, Array, Array appears everywhere.’ is closed to new replies.