WordPress Add Link to Admin Menu with mt_add_pages


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // Add link to Admin Menu
  2. // via bit.ly/wpsup-addadminlk
  3. function mt_add_pages() {
  4. add_menu_page('admin-menu', 'menu-name', 5, __FILE__, 'mt_toplevel_page');
  5. }
  6. function mt_toplevel_page() {
  7. echo '
  8. <div class="wrap">
  9. <h2>New admin menu</h2>
  10. <li><a href="http://www.icore.net.tc"><h3>Author Homepage</h3></a></li>
  11. </div>';
  12. }
  13. add_action('admin_menu', 'mt_add_pages');

URL: http://bit.ly/wpsup-addadminlk

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.