How to create a new page in Wordpress Admin for Editing the Details

Can you please help me with my proble regarding creating a New Page for Editing Details.

Currently, I have a list of Properties. This is a Custom Table not a post type. I already listed the properties but my problem is how am I gonna make the Edit Details Page?

add_action( 'admin_menu', 'pp_create_property_management_menu' ); function pp_create_property_management_menu() {
add_menu_page( 'PP M', 'PP M', 'manage_options', 'property-management', 'pp_property_management_page', 'dashicons-tickets', 5 ); }

Many thanks,

1 answer

  • answered 2017-11-15 01:24 Andrew Schultz

    The fifth parameter in the add_menu_page() function calls a function to output the contents of the menu page. Here's an example I have taken from the WordPress site on how to add a custom admin menu and show the details of the page.

    add_action( 'admin_menu', 'my_plugin_menu' );
    function my_plugin_menu() {
        add_menu_page( 'My Page Title', 'My Menu Title', 'manage_options', 'my-unique-identifier', 'my_plugin_options' );
    function my_plugin_options() {
        if ( !current_user_can( 'manage_options' ) )  {
            wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
        echo '<div class="wrap">';
        echo '<p>Put all your options in here</p>';
        echo '</div>';