Export a blog(not mine) as a PDF document

This kind of content scraping is frowned on. You’re trying to grab someone else’s content and put it into a transferable format over which they have no control. Yes, your intentions are sincere, but don’t be surprised if several people are hesitant to help. You do have some options, though. Contact the blog author This … Read more

Export posts to csv with data from ACF custom fields

Lol. I got reminded of this question when I got the Tumbleweed badge for having no answers and low views for a week. I didn’t figure out the right method for this but hacked through it by printing out the posts in a table format on the archive page for this custom post type and … Read more

export csv functionality into my plugin

The start of what you’re doing wrong can be explained by this quote: which action attribute points to a file (download.csv.php) in my plugin folder, that should not be shown, just prompt a file download dialog for the csv dump. and this code: $core = $_POST[‘download’].’wp-load.php’; if(isset($_POST[‘download’]) && is_file($core)){ require_once( $core ); What you’re basically … Read more

How do I add paragraph tags to all of my posts after relying on wpauto?

a quick and dirty way to do this is by running this ONCE: global $post; $posts = new WP_Query(); $posts->query(array(‘posts_per_page’ => -1, ‘post_type’ => ‘post’)); while ($posts->have_posts()): $posts->the_post(); $post->post_content = wpautop($post->post_content); // replaces new line chars with <p>’s wp_update_post($post); // updates the database endwhile; (didn’t test it) But how are you exporting your posts in … Read more

Problem: Create a cron job to export posts to a WordPress XML file on server

Your problem is that ob_file ain’t global. You only define it in c3m_export_xml(). Setting global $ob_file in ob_file_callback() gives you an empty file handle. Try this instead: function c3m_export_xml() { $args=array( ‘content’ => ‘posts’, ‘start_date’ => ‘october 2008’, ‘status’ => ‘published’); ob_start(); export_wp($args); $xml = ob_get_clean(); file_put_contents(‘server_path_to_my_file.xml’, $xml); }

How to Create Export/Import Functionality for Plugin

There are two basic approaches you can take. Use the standard wordpress inport / export plugin manually through the admin. Your custom post type must have the property can_export = true (default = true) If you go this route, there are interesting options for adding extra functionality for users, Check out this tutorial on adding … Read more

Import posts with featured images

If you export a single post type (i.e. posts, pages, a custom post type, etc…) it will not include attached media files like featured images. That’s incredibly idiotic, to me, but your options are — Export everything from site (which will include featured images), then modify the XML file as needed before importing to the … Read more