Hello everybody,
I followed step by step documentation to display my Google map field :https://www.advancedcustomfields.com/resources/google-map/
I don’t understant why, on front I see a marker but the marker isn’t at the same position as on the back and when i update the adress, market doesn’t move to another position…
Any help appeciated.
All the best.
Pierre
Hello I don’t know why problem comes from CPTUI, if I code by myself the custom post type all works like a charm, but with CPTUI it doesn’t work…
I have the same problem. Using functions.php to define custom post (code from CPTUI) doesn’t solve problem in my case :(. All plugins disabled except ACF – markers are still on wrong positions (distance to good position is not the same in each marker).
@Trint33 did you use php from CPTUI or something else?
Hello epoka,
here is my php code to register my custom post type I used.
Even if my function name is cptui_register_my_cpts, I started from scratch a new php code:
Strings are in french ;-).
function cptui_register_my_cpts() {
$labels = array(
"name" => __( 'Adhérents', '' ),
"singular_name" => __( 'Adhérent', '' ),
"menu_name" => __( 'Adhérents', '' ),
"all_items" => __( 'Tous les adhérents', '' ),
"add_new" => __( 'Ajouter un adhérent', '' ),
"add_new_item" => __( 'Ajouter un nouvel adhérent', '' ),
"edit_item" => __( 'Éditer un adhérent', '' ),
"new_item" => __( 'Nouvel adhérent', '' ),
"view_item" => __( 'Voir adhérent', '' ),
"view_items" => __( 'Voir les adhérents', '' ),
"search_items" => __( 'Rechercher un adhérent', '' ),
"not_found" => __( 'Aucun adhérent trouvé', '' ),
"not_found_in_trash" => __( 'Aucun adhérent trouvé dans la corbeille', '' ),
"featured_image" => __( 'Image à la une', '' ),
"set_featured_image" => __( 'Choisir image à la une', '' ),
"remove_featured_image" => __( 'Supprimer image à la une', '' ),
"use_featured_image" => __( 'Utiliser comme image à la une', '' ),
);
$args = array(
"label" => __( 'Adhérents', '' ),
"labels" => $labels,
"description" => "Nos adhérents",
"public" => true,
"publicly_queryable" => true,
"show_ui" => true,
"show_in_rest" => false,
"rest_base" => "",
"has_archive" => "adherents",
"show_in_menu" => true,
"exclude_from_search" => false,
"capability_type" => "post",
"map_meta_cap" => true,
"hierarchical" => false,
"rewrite" => array( "slug" => "adherents", "with_front" => false ),
"query_var" => true,
"supports" => array( "title", "editor", "thumbnail" ),
'menu_position' => 20,
"menu_icon" => "dashicons-groups",
);
register_post_type( "adherents", $args );
}
add_action( 'init', 'cptui_register_my_cpts' );
I really hope it will work for you.
Keep me in touch.
All the best.
Pierre
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.