Importable Menus? Along with Pages (a site layout template)

Menus are included in native WordPress export. It’s not too convenient that natively you can’t only export menus though. From quick look up there is WordPress Menu Exporter plugin available in official repository for that. Export/import aside there are more options to automate it, such as set up scripts with WP CLI or simply using … Read more

ExpressionEngine Export/Import Issues

I found the answer. The way the XML file was being rendered, there was no line break between the item closing tag, and the next item’s opening tag (</item><item>). This passed all validation tests, but WP wouldn’t process it properly. I added the line breaks, and everything worked as expected. Thanks to everyone for the … Read more

How to get sort content by page id?

I believe your best solution will be to setup postdata and the making use of the the_content() template tag $post = get_page_by_title( ‘About us’ ); setup_postdata( $post ); ?> <p> <?php the_content(); ?> </p> <?php wp_reset_postdata(); ?>

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

Get WP All Export row ID

We’ve got a solution from plugin’s developers: Add this code to theme’s functions.php file // run a function before export starts, it deletes counter value from DB add_action(‘pmxe_before_export’, ‘wp_all_export_pmxe_before_export’, 10, 1); function wp_all_export_pmxe_before_export($export_id) { delete_option(‘wp_all_export_current_row’); } Add this to All Export plugin’s Edit Export screen under ” Export the value returned by a PHP function” … Read more

How to add a timestamp to the exported WXR filename?

I don’t think you need to do that, it’s already there (if I understand the question correctly): In the WXR file we get a timestamp like: that’s generated with: <?php the_generator( ‘export’ ); ?> that calls get_the_generator() where the export case is: $gen = ‘<!– generator=”WordPress/’ . get_bloginfo_rss(‘version’) . ‘” created=”‘. date(‘Y-m-d H:i’) . ‘” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)