this is my first post so first of all : hello everybody, glad to be a part of the community. Secondly please escuse-me in advance for all the English mistakes, i'm french ...
Now this is the problem i have with Wordpress as i'm not a good developer for now :
I've created a custom post type based on the page model named 'Projects' for a more friendly display in the admin :
add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'Projects', array(
'labels' => array(
'name' => __( 'Menu Projects' ),
'singular_name' => __( 'Project' )
),
'hierarchical' => true,
'capability_type' => 'page',
'supports' => array('title','editor','thumbnail','custom-fields'),
'public' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-art'
));
}
Then i've add some custom fields i need :
add_action('wp_insert_post', 'wpc_champs_personnalises_defaut');
function wpc_champs_personnalises_defaut($post_id){
if( $_GET['post_type'] = 'Projects' ){
add_post_meta(1, 'company', '', true);
add_post_meta(2, 'année', '', true);
}
return true;
};
And now what I want is to display those post meta values in my menu items , right next to the name of the page !
I've tried different things unsucessfully, so if a Wordpress master could help me, that would be great ! Thanks in advance , have a good day !