If you’re developing custom WooCommerce documentation, reporting or functionalities for your clients, you probably also need to add a new “page” and a new “sidebar link” to the WordPress Admin Dashboard.
This is a very interesting topic and in the same way you can hide elements such as metaboxes, you can also add new ones. In my case, I had to implement a custom, admin-only form to enable product recommendations. Enjoy ๐
PHP Snippet: Add New Page and Menu Link to WordPress Dashboard > Products
/**
* @snippet New WooCommerce Products Admin Page
* @how-to Get CustomizeWoo.com FREE
* @author Rodolfo Melogli
* @compatible WooCommerce 7
* @community https://businessbloomer.com/club/
*/
add_action( 'admin_menu', 'bbloomer_wp_dashboard_products_new_page', 9999 );
function bbloomer_wp_dashboard_products_new_page() {
add_submenu_page( 'edit.php?post_type=product', 'New Page Title', 'New Page Menu Title', 'edit_products', 'new_page_slug', 'bbloomer_wp_dashboard_products_new_page_callback', 9999 );
}
function bbloomer_wp_dashboard_products_new_page_callback() {
echo '<div class="wrap"><h1 class="">New Page Title</h1>';
// add your your HTML, PHP, CSS, jQUERY here
echo '</div>';
}
Is it possible to add a page to DASHBOARD > WOOCOMMERCE instead of PRODUCT?
And if so how to achieve this?
Hi Peter, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Have taken this one step further… converted to a plugin with an included page containing a ( css only ) tabbed interface *so it doesnt interfere with other codes.
I have previously created a plugin for clients tom refer to when they are adding products.posts, pages etc. I use it a a teaching terminal right in the admin area.
With a few little mods, its a tut area for clients, right in the products menu.
Can post it here, if the need for it is voiced.
Nice one Roberta! Sure, feel free to share ๐