Thanks the Codex, I ve found the way to make one complicate one!
This outputs the name and link of a top parent (Gamme), with the posibility to append a text bore the name and after the name, yet in the link.
I can use
[gamme] for the name and link to the Gamme (ex: “buffets”)
[gamme before=”the best” after =”in Paris”] (ex: “the best buffets in Paris”)
[gamme] you won’t forget[/buffets] (ex: “buffets you won’t forget”)
$parents = get_post_ancestors( $post->ID );
$myId_Gamme = ($parents) ? $parents[count($parents)-1]: $post->ID;
$myUrl_Gamme = get_permalink($myId_Gamme);
$myName_Gamme = get_the_title($myId_Gamme);
extract(shortcode_atts(array(
"before" => '',
"after" => '',
), $atts));
echo '<a href="'.$myUrl_Gamme.'" title="'.$myName_Gamme.'">'.$before.''.$myName_Gamme.''.$after.''.$content.'</a>';
It would be nice to put on bottom of the plugin settings a link to the API WP codex that gives examples.
Thanks for the prompt support!