Support

Account

Home Forums ACF PRO Google map front end marker isn't at the right position Reply To: Google map front end marker isn't at the right position

  • 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