Home Wordpress WordPress Hook Add Custom Admin Menu and Page

WordPress Hook Add Custom Admin Menu and Page

by therichpost
0 comments
WordPress Hook Add Custom Admin Menu and Page

Hello guys how are you? Welcome back to my channel. Today in this post I am going to show you WordPress Hook Add Custom Admin Menu and Page.

WordPress Hook Add Custom Admin Menu and Page
WordPress Hook Add Custom Admin Menu and Page

Guys if you are new in WordPress or in WooCommerce then please check the below links for some good tutorials:

  1. WooCommerce Hooks
  2. WordPress Tricks
  3. WordPress Hooks

Guys here is the working code snippet for Woocommerce – Hide a shipping method if cart total is higher than an amount and please use carefully:

1. Guys here is the code snippet and you need to add your theme’s functions.php file:

function rich_admin_menu() {
    add_menu_page(
        __( 'Menu Title', 'my-textdomain' ),
        __( 'Menu Title', 'my-textdomain' ),
        'manage_options',
        'title-page',
        'rich_admin_page_contents',
        'dashicons-schedule',
        3
    );
    }
    add_action( 'admin_menu', 'rich_admin_menu' );
    function rich_admin_page_contents() {
    ?>
      <h1>Title Page</h1>
    <?php
     }
    ?>

This is it guys and if you will have any kind of query, suggestion or requirement then feel free to comment below.

Jassa

Developer’s King

Thanks

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.