Erreur non apprise: appel à la fonction non définie add_submenu_page ()
//Try this code
function books_register_ref_page() {
add_submenu_page(
'edit.php?post_type=portfolio',
__( 'Portfolio Settings', 'portfolio' ), //page titlte
__( 'Settings', 'portfolio' ), // submenu iteam name
'manage_options',
'portofile-setttings', //slug
'books_ref_page_callback' //render Page inside settings content
);
}
add_action( 'admin_menu', 'books_register_ref_page', 0 ); //resgister the function
//My mistake was i was using
add_action( 'init', 'books_register_ref_page', 0 ); // was using init instead of admin_menu
Singh99