WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Importer
Not Importing Custom Meta Data (5 posts)

  1. tendice
    Member
    Posted 10 months ago #

    Hi there,

    Importing a custom post type that has a custom field of "business-data" and the value is a serialized array

    for some reason this is not importing using the importer, Is there a way around this to get it to import?

    Cheers
    Oliver

    <wp:postmeta>
    <wp:meta_key>business-details</wp:meta_key>
    <wp:meta_value><![CDATA[a:19:{s:7:"address";s:50:"9, Emerys Road, Nottingham, NG42QR, United Kingdom";s:11:"gpsLatitude";s:18:"52.970996999999997";s:12:"gpsLongitude";s:9:"-1.064945";s:18:"streetViewLatitude";s:0:"";s:19:"streetViewLongitude";s:0:"";s:17:"streetViewHeading";s:0:"";s:15:"streetViewPitch";s:0:"";s:14:"streetViewZoom";s:1:"0";s:9:"telephone";s:11:"01158565440";s:5:"email";s:0:"";s:3:"web";s:0:"";s:11:"hoursMonday";s:0:"";s:12:"hoursTuesday";s:0:"";s:14:"hoursWednesday";s:0:"";s:13:"hoursThursday";s:0:"";s:11:"hoursFriday";s:0:"";s:13:"hoursSaturday";s:0:"";s:11:"hoursSunday";s:0:"";s:18:"alternativeContent";s:0:"";}]]></wp:meta_value>
    </wp:postmeta>

    http://wordpress.org/plugins/wordpress-importer/

  2. WebTechGlobal
    Member
    Posted 10 months ago #

    Try removing the CDATA and it's brackets etc. Treat the array as a string.

  3. tendice
    Member
    Posted 10 months ago #

    Will try that now

  4. tendice
    Member
    Posted 10 months ago #

    Still isn't importing the meta data

  5. WebTechGlobal
    Member
    Posted 10 months ago #

    Try wrapping the serial string in single quotes to prevent it being escaped. I'm sure I read that it is possible to import a serialized array, just never done it.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.