Created
October 20, 2016 08:10
-
-
Save mvaneijgen/3158c2ef88d7585776bcaaeae1d2f804 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 | |
require_once 'wp-load.php'; | |
$args = array( | |
'post_type' => 'foto_archief', | |
'posts_per_page' => -1 | |
); | |
$items = get_posts( $args ); | |
if ($items ) { | |
foreach( $items AS $item ) { | |
$myData = get_field("date", $item->ID); | |
update_field("date", $myData, $item->ID); | |
echo "Updated post with ID ".$item->ID."<br/>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment