Hi
you can updated custom field ‘locate-anything-marker-color’ on loop for each CPT
eg
$args = array(
'post_type' => 'place',
'post_status' => 'publish',
'posts_per_page' => -1,
);
$the_query = new WP_Query( $args );
while ( $the_query->have_posts() ) : $the_query->the_post();
update_post_meta( $post->ID, 'locate-anything-marker-color', 'red' )[0];
endwhile;
wp_reset_query();
$args = array(
'post_type' => 'place2',
'post_status' => 'publish',
'posts_per_page' => -1,
);
$the_query = new WP_Query( $args );
while ( $the_query->have_posts() ) : $the_query->the_post();
update_post_meta( $post->ID, 'locate-anything-marker-color', 'blue' )[0];
endwhile;
wp_reset_query();
-
This reply was modified 2 years, 9 months ago by
Yui.
-
This reply was modified 2 years, 9 months ago by
dgamoni.