1. Go to this page and download the library: Download frozzare/wp-content-menu library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
frozzare / wp-content-menu example snippets
// With `register_post_type`
register_post_type( 'book', [
'content_menu' => true
] );
// With the filter.
add_filter( 'content_menu_post_types', function ( $post_types ) {
return ['page', 'post', 'book']
} );