Solution:
Two alternatives. You can add an invisible sub menu page, or work with the URL: /wp-admin/options-general.php?page=crud&create=true
.
For this second option, it’s just:
function crudboard()
{
$add_new_url = admin_url('options-general.php?page=crud&create=true');
?>
<div class="wrap">
<?php if( !isset( $_GET['create'] ) ) { ?>
<h2>
Motors
<a class="add_new-h2" href="<?php echo $add_new_url; ?>">Add New</a>
</h2>
<table class="wp-list-table widefat fixed pages">
<tr><td>Start page</td></tr>
</table>
<?php } else {
include 'create.php';
}
}
And a sample create.php
file:
<?php
/**
* Create page
*/
?>
<h2>Add new Motor</h2>
<table class="wp-list-table widefat fixed pages">
<tr><td>Create page</td></tr>
</table>