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 | |
$the_query = new WP_Query( array( | |
'post_type' => 'items', | |
'tax_query' => array( | |
array ( | |
'taxonomy' => 'washu_ppi_items_types', | |
'field' => 'slug', | |
'terms' => 'apartments', | |
) | |
), | |
'posts_per_page' => -1 | |
) ); | |
$apartment_ids = array(); | |
while ( $the_query->have_posts() ) : | |
$the_query->the_post(); | |
// Show Posts ... | |
$a = apply_filters( 'the_content', get_the_content() ); | |
$b = update_field( 'washu_ppi_summary', $a ); | |
if ( true == $b ) { | |
echo get_the_ID() . ' update succesfully'; | |
} else { | |
echo get_the_ID() . ' ERROR!'; | |
} | |
endwhile; | |
/* Restore original Post Data | |
* NB: Because we are using new WP_Query we aren't stomping on the | |
* original $wp_query and it does not need to be reset. | |
*/ | |
wp_reset_postdata(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment