how to assign a URL to a file in WooCommerce?
-
This function adds a tab named “Special Page” into “My Account” tab list:
add_filter( 'woocommerce_account_menu_items' , 'jc_menu_panel_nav' ); function jc_menu_panel_nav() { $items = array( 'dashboard' => __( 'Dashboard', 'woocommerce' ), 'orders' => __( 'Orders', 'woocommerce' ), 'downloads' => __( 'Downloads', 'woocommerce' ), 'edit-address' => __( 'Addresses', 'woocommerce' ), 'payment-methods' => __( 'Payment Methods', 'woocommerce' ), 'edit-account' => __( 'Account Details', 'woocommerce' ), 'special-page' => __( 'Special Page', 'woocommerce' ), // My custom tab here 'customer-logout' => __( 'Logout', 'woocommerce' ), ); return $items; }
That results in this: [ View Image ]
And the link points to
my-account/special-page/
, but naturally gives a 404 error.How I can assign this URL to a file named
special-page.php
?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘how to assign a URL to a file in WooCommerce?’ is closed to new replies.