WordPress Hook Add Custom Admin Menu and PageWordPress 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

By therichpost

Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 19, MedusaJs, Next.js, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

Leave a Reply

Your email address will not be published. Required fields are marked *

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