menu page wordpress code example

Example: To add a new Top-level menu to WordPress Administration, use the add_menu_page() function.

//////neha jaiswal///
<?php
add_action('admin_menu','wpac_register_menu_page');
function wpac_register_menu_page()
{
	add_menu_page('WPASsystem','WPAC Settings','manage_options','wpac-setting','wpac_settings_page_html','dashicons-admin-plugins',15);
}
function wpac_settings_page_html()
{		$content='';
	$content.="<h1>welocome</h1>";
	$content.='<form method="post">
	  <h1>Contact Us</h1>
        <div class="info">
          <input type="text" name="name" placeholder="Full name">
          <input type="text" name="email" placeholder="Email">
          <input type="text" name="number" placeholder="Phone number">
          <input type="text" name="Website" placeholder="Website">
        </div>
        <p>Message</p>
        <div>
          <textarea rows="4"></textarea>
        </div>
        <button type="submit" href="">Submit</button>
      </form>';
echo $content.='<button><a href="https://www.w3schools.com">absgfs</a></button>';
}
add_shortcode('wpac-setting','wpac_settings_page_html');
?>
/////////////// plz visit this site for more details //////
https://developer.wordpress.org/plugins/administration-menus/top-level-menus/

Tags:

Php Example