I am pretty desperate to migrate all of my data from my MySQL DB to a MSSQL server. Wordpress is currently installed and the site is running with all of the normal posts etc... displayed. The only problem is its not showing the custom post type META data. Most of the site consists of this custom meta data as it has different fields for product descriptions etc... .
function my_meta_init_test()
{
// review the function reference for parameter details
// http://codex.wordpress.org/Function_Reference/wp_enqueue_script
// http://codex.wordpress.org/Function_Reference/wp_enqueue_style
//wp_enqueue_script('my_meta_js', MY_THEME_PATH . '/custom/meta.js', array('jquery'));
wp_enqueue_style('my_meta_css', MY_THEME_PATH . '/custom/meta.css');
// review the function reference for parameter details
// http://codex.wordpress.org/Function_Reference/add_meta_box
foreach (array('products') as $type)
{
add_meta_box('my_all_meta', 'Product Information', 'my_meta_setup_test', $type, 'normal', 'high');
}
add_action('save_post','my_meta_save');
}
function my_meta_setup_test()
{
global $post;
// using an underscore, prevents the meta variable
// from showing up in the custom fields section
$meta = get_post_meta($post->ID,'_my_meta',TRUE);
// instead of writing HTML here, lets do an include
include(MY_THEME_FOLDER . '/custom/product-info.php');
// create a custom nonce for submit verification later
echo '<input type="hidden" name="my_meta_noncename" value="' . wp_create_nonce(__FILE__) . '" />';
}
This is a short cut of the code to set up the custom meta fields in the WP admin. It is called by this:
<div class="my_meta_control">
<label>Home Slider Content</label>
<p><textarea class="theEditor" name="_my_meta[homecontent]" rows="10"><?php if(!empty($meta['homecontent'])) echo $meta['homecontent']; ?></textarea></p>
<label>Footer Content</label>
<p><textarea name="_my_meta[footercontent]" rows="3"><?php if(!empty($meta['footercontent'])) echo $meta['footercontent']; ?></textarea></p>
<label>General Overview</label>
<p><textarea class="theEditor" name="_my_meta[overview]" rows="10"><?php if(!empty($meta['overview'])) echo $meta['overview']; ?></textarea></p>
<label>Features & Benefits</label>
<p><textarea class="theEditor" name="_my_meta[features]" rows="10"><?php if(!empty($meta['features'])) echo $meta['features']; ?></textarea></p>
I would appreciate any help,
Thanks :)