Meta boxes not saving

I believe the issue is this line: if( $post->post_type == ‘startups’ ) return; Won’t your custom posts always have the type startups? Basically you are telling your code that whenever I save my custom post type, ignore my custom fields. You probably meant to have one of the WP reserved types (e.g. revision or attachment) … Read more

How to retrieve custom field values and save again as array

This is how I would do it… $page_list = get_pages(); foreach($page_list as $page) { $post_id = $page->ID; $custArray = array( ‘_custField1’ => get_post_meta( $post_id, ‘_custField1’, true ), ‘_custField2’ => get_post_meta( $post_id, ‘_custField2’, true ), ‘_custField3’ => get_post_meta( $post_id, ‘_custField3’, true ), ‘_custField4’ => get_post_meta( $post_id, ‘_custField4’, true ) ); add_post_meta ( $post_id, ‘_newcust’, $custArray, true … Read more

WooCommerce – Adding Product Attributes to CSV Export

With the help of a more knowledgeable colleague, we got it working. Here’s the code: /** Add custom column headers **/ function wc_csv_export_modify_column_headers( $column_headers ) { $new_headers = array( ‘fund’ => ‘fund’, ‘appeal’ => ‘appeal_code’, ); return array_merge( $column_headers, $new_headers ); } add_filter( ‘wc_customer_order_csv_export_order_headers’, ‘wc_csv_export_modify_column_headers’ ); /** Set the data for each for custom columns … Read more

How come there is no wp-content directory in wp theme

wp-config-sample.php lives in your public_html directory. WordPress installation is normally called latest.zip and available at http://wordpress.org/latest.zip If you are using Filezila, get that zip file, unzip locally and upload the contents of the zip file to your public_html directory. Edit wp-config-sample.php, rename it to wp-config.php and point your browser to http://thegoods.info You should see the … Read more