Last active
September 13, 2019 04:36
-
-
Save Musilda/7ee900fae1a6c709d07159f35be84b74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $wp_aui; | |
$custom_posts = get_posts($args); | |
foreach($custom_posts as $post) : setup_postdata($post); | |
$content = $wp_aui->save($post); | |
wp_insert_post( array( 'ID' => $post->ID, 'post_content' => $content ) ); | |
endforeach; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment