diff --git a/web/wp-content/mu-plugins/wp-mu-plugins/lf-mu/admin/partials/cpts.php b/web/wp-content/mu-plugins/wp-mu-plugins/lf-mu/admin/partials/cpts.php index d1512a22..9ddc27f3 100644 --- a/web/wp-content/mu-plugins/wp-mu-plugins/lf-mu/admin/partials/cpts.php +++ b/web/wp-content/mu-plugins/wp-mu-plugins/lf-mu/admin/partials/cpts.php @@ -180,7 +180,7 @@ 'singular_name' => __( 'Person' ), 'all_items' => __( 'All People' ), ), - 'public' => false, + 'public' => true, 'has_archive' => false, 'show_in_nav_menus' => false, 'show_in_rest' => true, diff --git a/web/wp-content/mu-plugins/wp-mu-plugins/lf-mu/admin/partials/sync-people.php b/web/wp-content/mu-plugins/wp-mu-plugins/lf-mu/admin/partials/sync-people.php index 563f1350..6d0011e7 100644 --- a/web/wp-content/mu-plugins/wp-mu-plugins/lf-mu/admin/partials/sync-people.php +++ b/web/wp-content/mu-plugins/wp-mu-plugins/lf-mu/admin/partials/sync-people.php @@ -76,11 +76,11 @@ function geocode_location( $id ) { $synced_ids = array(); +$i = 1; foreach ( $people as $p ) { - $params = array( 'post_type' => 'lf_person', - 'post_title' => $p->name, + 'post_title' => $p->name . $i, 'post_content' => $p->bio, 'post_status' => 'publish', 'meta_input' => array(), @@ -150,7 +150,7 @@ function geocode_location( $id ) { $args = array( 'post_type' => 'lf_person', - 'title' => $p->name, + 'title' => $p->name . $i, 'post_status' => 'publish', 'numberposts' => 1, ); @@ -204,17 +204,17 @@ function geocode_location( $id ) { } // delete any People posts which aren't in $synced_ids. -$query = new WP_Query( - array( - 'post_type' => 'lf_person', - 'post__not_in' => $synced_ids, - 'posts_per_page' => -1, - ) -); -while ( $query->have_posts() ) { - $query->the_post(); - wp_delete_post( get_the_id() ); -} +// $query = new WP_Query( +// array( +// 'post_type' => 'lf_person', +// 'post__not_in' => $synced_ids, +// 'posts_per_page' => -1, +// ) +// ); +// while ( $query->have_posts() ) { +// $query->the_post(); +// wp_delete_post( get_the_id() ); +// } // clear the site cache. if ( function_exists( 'pantheon_wp_clear_edge_all' ) ) {