My Account Menu
It is a complete my account menu customization guide. In this tutorial I will explain you how to remove links from the menu properly, how to add pages with custom icons there and how to reorder menu elements.

Remove Links from My Account Menu
Probably, it is the most easiest part of this tutorial. For example let’s imagine that our e-commerce shop doesn’t sell physical goods – and in that case maybe we do not need Addresses section (yes, I know that Billing Address details are also there, but we’re just learning now). Or maybe you want to remove Downloads from WooCommerce my account menu. Both are possible.
/**
* @snippet Remove My Account Menu Links
* @author Misha Rudrastyh
* @url https://rudrastyh.com/woocommerce/my-account-menu.html#remove_items
*/
add_filter( 'woocommerce_account_menu_items', 'misha_remove_my_account_links' );
function misha_remove_my_account_links( $menu_links ){
unset( $menu_links[ 'edit-address' ] ); // Addresses
//unset( $menu_links[ 'dashboard' ] ); // Remove Dashboard
//unset( $menu_links[ 'payment-methods' ] ); // Remove Payment Methods
//unset( $menu_links[ 'orders' ] ); // Remove Orders
//unset( $menu_links[ 'downloads' ] ); // Disable Downloads
//unset( $menu_links[ 'edit-account' ] ); // Remove Account details tab
//unset( $menu_links[ 'customer-logout' ] ); // Remove Logout link
return $menu_links;
}
I hope you know where to insert all the code from this post, if you don’t – insert the code to your current theme functions.php
.

How to remove endpoints so the removed pages will return 404
It was simple enough, but we have not finished yet, if you go to /my-account/edit-address/
directly, it will show you Addresses page. This should not happen, right?
The first thought that came to my mind was to remove endpoints somehow. Dealing with $wp_rewrite
or something like that. Please do not!
The thing is when you want to remove both the menu item and its page as well, you do not need any coding. You can find all the default My Account subpages in WooCommerce > Settings > Advanced. All you need is just to set a specific endpoint empty.

Rename My Account Menu Links
Can be done with the same woocommerce_account_menu_items
, all you need is to know a tab ID you would like to rename, all of them were mentioned above.
/**
* @snippet Rename My Account Menu Links
* @author Misha Rudrastyh
* @url https://rudrastyh.com/woocommerce/my-account-menu.html#rename_tabs
*/
add_filter( 'woocommerce_account_menu_items', 'misha_rename_downloads' );
function misha_rename_downloads( $menu_links ){
// $menu_links[ 'TAB ID HERE' ] = 'NEW TAB NAME HERE';
$menu_links[ 'downloads' ] = 'My Files';
return $menu_links;
}

The same way you can rename any menu item you want 👍
Change My Account Menu Items Order
Changing order of my account menu items is just changing order of array elements. So, if you didn’t remove or add any custom menu links there, your $menu_links
may look like this:
print_r( $menu_links );
/* Array
(
[dashboard] => Dashboard
[orders] => Orders
[downloads] => Downloads
[edit-address] => Addresses
[edit-account] => Account details
[customer-logout] => Logout
) */
The easiest way to reorder it is just to re-create this array.
/**
* @snippet Reorder My Account Menu Links
* @author Misha Rudrastyh
* @url https://rudrastyh.com/woocommerce/my-account-menu.html#change-order
*/
add_filter( 'woocommerce_account_menu_items', 'misha_menu_links_reorder' );
function misha_menu_links_reorder( $menu_links ){
return array(
'dashboard' => __( 'Dashboard', 'woocommerce' ),
'downloads' => __( 'My Files', 'mishadomain' ),
'orders' => __( 'Orders', 'woocommerce' ),
//'edit-address' => __( 'Addresses', 'woocommerce' ),
'edit-account' => __( 'Account details', 'woocommerce' ),
'customer-logout' => __( 'Logout', 'woocommerce' )
);
}
I also decided to add the changes that we’ve made in this and this chapters.

Add Custom Page in My Account
In order to make it easier I will just provide the read-to-use code, you can insert it to your current theme functions.php
file or a custom plugin.
/**
* @snippet Add Custom Page in My Account
* @author Misha Rudrastyh
* @url https://rudrastyh.com/woocommerce/my-account-menu.html#add-custom-tab
*/
// add menu link
add_filter ( 'woocommerce_account_menu_items', 'misha_log_history_link', 40 );
function misha_log_history_link( $menu_links ){
$menu_links = array_slice( $menu_links, 0, 5, true )
+ array( 'log-history' => 'Log history' )
+ array_slice( $menu_links, 5, NULL, true );
return $menu_links;
}
// register permalink endpoint
add_action( 'init', 'misha_add_endpoint' );
function misha_add_endpoint() {
add_rewrite_endpoint( 'log-history', EP_PAGES );
}
// content for the new page in My Account, woocommerce_account_{ENDPOINT NAME}_endpoint
add_action( 'woocommerce_account_log-history_endpoint', 'misha_my_account_endpoint_content' );
function misha_my_account_endpoint_content() {
// of course you can print dynamic content here, one of the most useful functions here is get_current_user_id()
echo 'Last time you logged in: yesterday from Safari.';
}
Some notes:
- I used
array_splice()
PHP function in order to display our “Log history” link just before “Logout” link. If I used code like this$menu_links[ 'log-history' ] = 'Log history'
, then our new link was displayed at the very end. - Everything else should be pretty clear but because we made changes in permalinks, do not forget to refresh the cache. In order to do that please go to Settings > Permalinks in WordPress admin and just save changes without changing anything.
How to set a custom icon
When you add a custom page into My Account, by default its icon is kind of boring:

What about changing it to something more interesting?
Great idea, but the implementation may vary depending on a theme you’re currently using. For WooCommerce Storefront theme it is quite simple – you can use any of FontAwesome icons for that purpose.
So, you can go to FontAwesome website, then choose an icon and copy its unicode code.

Now we have to use that code in CSS like that:
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--log-history a:before{
content: "\f21b"
}
You can add this CSS to an existing .css file of your theme or via wp_head
action hook. Don’t forget to change --log-history
part of the CSS class with your own.
Now, if you go to /my-account/log-history/
or click the appropriate menu item, this page should appear.

Add Menu Link with External URL
There is no specific filter for that but I will show you a very simple trick. In the first part of the code we will add a new element to menu items array.
In the second part of the code we’ll just hook its URL.
<?php
// add link to the menu
add_filter ( 'woocommerce_account_menu_items', 'misha_one_more_link' );
function misha_one_more_link( $menu_links ){
// we will hook "anyuniquetext123" later
$new = array( 'anyuniquetext123' => 'Gift for you' );
// or in case you need 2 links
// $new = array( 'link1' => 'Link 1', 'link2' => 'Link 2' );
// array_slice() is good when you want to add an element between the other ones
$menu_links = array_slice( $menu_links, 0, 1, true )
+ $new
+ array_slice( $menu_links, 1, NULL, true );
return $menu_links;
}
// hook the external URL
add_filter( 'woocommerce_get_endpoint_url', 'misha_hook_endpoint', 10, 4 );
function misha_hook_endpoint( $url, $endpoint, $value, $permalink ){
if( 'anyuniquetext123' === $endpoint ) {
// ok, here is the place for your custom URL, it could be external
$url = 'https://example.com';
}
return $url;
}
// custom icon
add_action( 'wp_head', 'misha_link_custom_icon' );
function misha_link_custom_icon() {
?><style>
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--anyuniquetext123 a:before{
content: "\f1fd"
}
</style><?php
}
This is how My Account menu looks for me now:

My Account Menu Hooks
Using the action hooks below you can add any text or HTML code just before and just after the menu <nav>
element.
<?php
add_action( 'woocommerce_before_account_navigation', 'misha_some_content_before' );
function misha_some_content_before(){
echo 'blah blah blah before';
}
add_action( 'woocommerce_after_account_navigation', 'misha_some_content_after' );
function misha_some_content_after(){
?>
<p>blah blah blah after</p>
<?php
}
But I want you to keep in mind one thing – this may not be so simple as it seems, because in most cases the My Account <nav>
element has float:left
CSS property.
That’s all!

Misha Rudrastyh
Hey guys and welcome to my website. For more than 10 years I've been doing my best to share with you some superb WordPress guides and tips for free.
Need some developer help? Contact me
You are a life saver. Thank you
Hi, Great help thanks with this code. If I want the endpoint url for the extra tab to be changed say from /my-account/log-history/ to /my-account/email-preference, how can I do this please?
Hi Craig,
Just replace
log-history
everywhere in your code withemail-preference
.Hi
Any idea how to remove the “Sales summary” widget from the Dashboard tab? (WC product vendors, WC bookings add on). Or how to remove the Dashboard tab all together..
I have a booking website that does’t sell any products and this widget has stuff like top seller, out of stock, in stock etc confusing my vendors.
Thanks
Hey Jay,
Here is how to remove it completely.
Super useful tutorial, thank you!
Always welcome 🙃
Great article Misha. I wanted to show a link in the menu to show just my orders. I can do that by adding a custom link http://www.xyz.com/my-account/orders
But I can still access http://www.xyz.com/my-account
Is there a way this is not accessible. Or people can be redirected to orders page.
Hi,
Try something like this:
Hi Misha, this is great. Is there a way to have the new item I’ve added to “my account” page to appear only for specififc user roles?
Thanks
Hi Avilly,
Yes, sure, please try this condition:
if( current_user_can( 'USER_ROLE_HERE' ) ) {
Misha, this is awesome! Great post and very informative – thank you so much!
I have a quick question that I can’t seem to find the answer for: On the My Account page, going to the shipping fields, I have a phone number field (shipping_phone) that I cannot get rid of or edit using the WooCommerce Checkout Manager because it does not show up.
Any idea how I can either get rid of said field (or, ideally, just change it to “right” instead of “wide”)?
Hi,
Thank you! 🙃
Please clarify one thing – do you want to get rid of the phone field on the My Account page or on the Checkout page?
Hey there, Misha!
The one on the My Account page. I have my billing address setup just fine, but the shipping address is forcing the phone number to be a whole line instead of the left/right option I’m searching for.
Thanks again!
Hey,
Ok, how did you add the phone field? Because by default there is no phone field on the Edit Shipping Address page.
Good
Hey Misha!
Thanks a lot for this, right info at the right time. Very many thanks and wish you all the best for 2018
OLAF
Hey Olaf!
Thank you 🙃
I wish you all the best too!🎄
Hi,
thx for this I understand now how it works …I thought I understand :-(
I want to show the user_id before the navigation but it does not work.
I get as result “Your ID” and it is formated well but NOT the logged in user_id
(user_id is also my customer number – so I have to show it)
please can you help me?
Found solution but I dont’ understand why I have to set a global again (???)
Maybe this is not the really right way (so please let me know) but it works.
Hi,
Please try this:
Thx so lot!
Looks better than my
Hi Misha,
Thank you for this tutorial. I’m trying to put all woocommerce related plugins into woocommerce account. These plugins would usually create their pages but I want those pages to be inside woocommerce account. which of the sections of your tutorials should I use? Add Items with custom URLs or Add Items with My Account subpages. I’m thinking Add items with custom URLs? and if it’s subpages can you show me exactly what to use to bring those pages under my account in place of (the echo ‘Last time you logged in: yesterday from Safari.’;) in your code.
Thank you
Hey Olufemi,
I’m sorry, but your task is not 100% clear for me. Could you please provide a specific example?
Hi Misha
What about hiding the menu items based on user role? :)
Hey Ben,
Do you mean something like this? 🙃
Hello thanks for this tutorial, try to put the function that lists the sensei courses inside but it does not work, can you help me?
I found the function
In sensei documentation, but not going
I never worked with Sensei, but try this too:
echo Sensei()->course->load_user_courses_content( get_current_user_id() );
i have Created Link Support in My Account But It will load separately. i want to load under same page.
I want to Load page my-tickets in My account/Support/my-ticket
How can i do that?
What do you mean “separately” ?
It’s load in different url. I want to load under my account /page name/page file
For example : my account/address/ edit address
Read this.
But once you did it, go to Permalinks settings and just click Save Changes button.
Hello ! Thanks for the tutorials !
I tried to addd My Account Menu Links with Custom URLs, but It’s not working
I just copy paste your code and changed the Url but I have error 500 when I go back to my website.
Can you help me ?
Thanks a lot
It’s seems that I have a problem with how I write the url in the code.
Can you give an exemple ?
thks !
Hello,
How you write your URL?
Hi , it worked actually !
But could you explain to me how you place the new page wherever you want into the dropdown ?
I don’t understand the array_slice code.
I already have 8 tabs and I would like to add a customized tab on the 3rd position. For now it’s on the middle.
Thanksss
Hello Misha
Nice blog. !! and thanks for the function.
can you please tell me if I want to use function twice (Add My Account Menu Links with Custom URLs) then what changes I have to made in 2nd hook?
Thanks
Hello!
Thank you! 🙃
Something like this:
Hi Misha
Thanks for your feedback. Well I did complete duplicate of the function. well I will try this one too.
Thanks !!
hi misha, thanks for your great article, it helps me well.
how can i add new menu (endpoint) to my account page, let’s called ‘Confirmation’ (in this menu, i want my customer to upload conformation for their payment, i.e. bank transfer recipe screenshoot).
i use plugin called ‘WordPress File Upload’ as it can build upload form.
i also want to make custom dropdown contain customer order (dynamic dropdown hooked from woocommerce, but i don’t know to do it)
the scenario is like this :
1. customer login and make payment (place order)
2. they have to upload transfer recipe
3. customer go to ‘my account’ page and click ‘Confirmation’ menu made custom.
4. on ‘Confirmation’ section, there is form : Order ID and upload button.
sorry for my bad english grammar, thanks anyway
Hi,
I can help you with the code, just contact me by email.
How can I change the text color of the custom link on my account?
With CSS
Thank you
Hi there, I just found your post. Very easy to follow and super helpful. Thank you!
But I’m having a bit of trouble with this part.
The new menu item is appearing, but when I click on it, I get a 404 error. Any thoughts on this? Thank you!
Doh! Nevermind, I figured it out….I forgot to clear my cache. Thank you again, great post!
Hi,
I’m glad you’ve figured it out 🙃
This was extremely helpful, thanks Misha!
Hi Misha, I appreciate you for taking the time to create this extremely timely and informative post as this is the very issue I am running into currently!
I am curious do you know if it is possible to integrate the membership menu items into the main account menu?
I would like to have one navigation rather then have the items under the membership menu buried like they are.
Thank you in advance for your response and please have a fantastic day!
Hey,
Thank you 🙃
I think it is possible, but clarify please what membership menu items do you mean?
Thank you so much for your reply! It would be the woocommerce memberships plugin menu
Currently the structure is to get to the sub-menu I would like to move to the main account menu is under the memberships menu item on the main account menu.
I hope I am making sense and again I appreciate your time in responding to my questions!
I have a membership site being driven by woocommerce memberships. Currently the only way to see the discounted products is to go through a very convoluted path to get to them
the nav is like this
Memberships > click view button under the membership tier you are a member of > then you finally get to the menu I would like to move.
That submenu consists of – Content, Products, Discounts, Notes, manage
I would like to move the above membership menu items out to the main account menu or have a link to that membership on the account main page that will only show if you are a member of two certain membership tiers.
Thank you for your patience!
Sorry, it still seems not enough info for me to help you in comments…
But I think I can help you, please contact me.
This info was very helpful … thank you! Now I just need to figure out how to restrict visibility of the added link to a specific user role, preferably without using an added membership plugin. Any suggestions?
If I understand you correctly, it is as simple as:
Thanks Misha … that seems like the type of thing I’m looking for, but I can’t quite figure out where to insert it in my snippet.
Hi misha!
thank you for the informative session
In my account page i want to make login for specific customer, and after they login i want them to redirect to their products page only but unfortunately i am unable to do it, every time clicking on return to products all the website products appear.
your help will be great support
Thank you
Hi
Great code example :)
What if you have 3 links, you only show how to put 1 URL…
Any chance you can help?
Thank you in advance
This was an extremely useful tutorial.
I was wondering is it possible to have different My Account menu elements based on the user’s role? In my case I have ’employers’ and ‘candidates’ and the latter should not see Orders.
Hi – I want to use the code you have above in the section entitled “Add My Account Menu Links with Custom URLs “.
I know nothing about php, but i added it to the child them functions.php and it works – but the custom link shows up second in the order, as you intended.
What do I need to change to make the custom link show up between two different links, for instance 4th in the order instead of 2cd? or 12th?
(I am using the plugin Woo Commerce Account Pages and will actually have up to 20 links, and I need the custom link to be 12th in the order)
I really appreciate the help and thank you in advance,
Perry
What is the name of file where add this code?
I think, if you are not using your custom theme, the simplest way is to made a plugin and put code there.
Man, this is the best guide, I’ve seen so far. Others use four times more code to achieve the same result, as you did in an elegant way, thank you for sharing.
Also I want to mention that if you remove endpoint in WC settings by lefting it blank, the item will disappear from the menu and you don’t need to do
unset( $menu_links['edit-address'] );
Thank you! 🙃
Hello,
is it possible to add custom menu item without:
Go to Settings > Permalinks and just push “Save Changes” button.
Thank you :)
Hi,
Yes, I understand what you probably mean 🙃
When you add this functionality in your custom plugin or theme, there is no way to ask the users to go to Settings and do something.
So,
flush_rewrite_rules();
will help you with it. But do not add it directly tofunctions.php
because this function must be run only once!For a custom plugin, it can look something like this:
What Custom plugin can we add this, because I use My Custom Function plugin to add any tweaks to my site. So, could I still use this and should be at the beginning or end of the editor?
Kindly refer.
Thanks
You can use it in your main plugin file, between
<?php
and?>
and not inside any other functions.Hi,
yea, I figured it out. Works perfectly.
Thank you though.
I got this setup pretty well but the content isn’t showing at all. Confused as to why.
Ah never mind. I got it. I was changing all your log-history stuff and missed the endpoint part. Great tutorial Misha, thanks!
I’m glad you’ve figured it out.
Thank you! 🙃
Thanks. Hey, have you ever done a child tab? We are creating a Rewards program with YITH’s plugin and I’d love to have a child tab under theirs on the dashboard. So when a user clicks on the Rewards tab a Rewards Rules tab slides down.
No, I haven’t.
By the way, this WooCommerce functionality doesn’t allow that, but it is possible to do the following way.
1. Create child links (tabs) below the parent one just like the parent links
2. Do all the other stuff in JS and CSS :)
I think it is allowed. YITH actually has an entire accordion when you sign up for an account with them. Check theirs out. That’s what I’m actually coding now.
I didn’t say it is not possible. I meant just that WooCommerce default hook
woocommerce_account_menu_items
doesn’t support child items.I can publish a tutorial about that, if you want, but it will be on Thursday.
No need thank you. I already coded it. Thank you though.
No problems. Maybe I will publish it anyway, so you can compare the way you did it.
I found this article very useful! Thank you very much for sharing.
I was wondering, I really liked the Gift idea since i’m planning to give users that already bought items in my store some discounts.
Do you recommend any plug-in to do so?
Than you!
Hi Paola,
Thank you!
Usually I do not use plugins. But similar functionality you can find in this tutorial and check out this conditional function:
wc_customer_bought_product()
.Hi Misha,
Thank you for this article. It is very useful. I just want to ask a very basic question.
“My Account” default look is not same with yours. I mean at my side content part is below navigation links (this is important for me) and i can not see any icons on my navigation items. And also the colors are not purple like yours.
Could you please explain me why this is about?
Thank you
Oh, Ok i solved it. It was the storefront theme now i understand
Thank you for the tutorial!
I’m interested in adding 2 custom links to the my account page. I have used your php snippet but I don’t know how to change the final part to use the array of links defined before.
In the example only one link is defined:
Hi Daniel,
Here is how:
Thanks a lot Misha, this answers my question, too.
Thank you very much Misha!
I have no knowledge of php and I was finding very hard to guess how to do it.
Thank you for the very interesting question! 🔥
Hmmm… I have only this idea:
I have tried your suggestion, but it is not changing the title on the newly created endpoint.
Strange, for me it works. Maybe the title is hardcoded in your theme.
I see the issue…
$title == 'My account'
when I change it to$title == 'My Account'
your code changes the title.But I run into another issue is that I have a link in my top nav bar entitled “My Account” and it changes that link name as well.
replace user_submit with your required page group-registration
Add the condition as follows so that it doesn’t change the menu items:
The best code is to check if post_id is this of myaccount page not the title because maybe have changed.
Just go to Appearance > Menus and manually change it there.
Hi Misha
I’ve got a new menu with a specific new filed for the user account.
How can i save this changes with a “save changes” button.
Thank you for your help.
kind regards
sandro
Hi Sando,
Your form tag should look like
<form method="post">
.Then save your changes from the
$_POST
variable. You can do it withintemplate_redirect
. AJAX is an option too.Thank you Misha for your fast replay.
Hi Misha!
Thank you once again for the great tutorial. But one question, for an external url added in $url = (‘myurl’)
How can I open it in a new tab?
Is there a way to do that?
ErnestPH
Hey,
Always welcome! 🙃
I’m afraid JS/jQuery is the only option at this moment…
Indeed. But thanks for the reply! :)
Thank you so much for this code, Misha! This has been very handy in adding a custom URL to our customers’ account page to process their own returns.
My question would be:
We are using Custom URL code, and am curious how one would go about making that custom URL open in a new tab, as our return processing is handled on a different site.
TIA! Very much appreciated.
Hi Jason,
The answer to your question is just one comment above 😁
jquery it is. Thank you very much for getting back to me in spite of my over-looking of the comment above. Have a great one!
Hi Misha,
thanks for code and examples. I have two questions about this:
1.) How do I have to set the url for an internal WordPress site? Do I have to set the complete url, the page id or something?
2.) Is it possible to change the first page displayed? I want to hide the dashboard an make another menu-point the first one.
Thanks for some help!
Best regards,
Timo
Hi Timo,
1) Yep, the complete URL, you can use
site_url()
orhome_url()
for that.2) The code below works for me.
Hi Misha,
great – thanks a lot! Everything works fine with your help!
I want my menu link to go to a specific URL and not use $url = site_url();
What can I change to have a custom URL in there?
Hey David,
$url = 'https://rudrastyh.com';
would be ok.I copy/pasted your code for adding a tab in the menu, but nothing happend
…BTW I copy/pasted it into the function.php file
Hey Ren,
You have to paste it to your
functions.php
Hi Misha,
First a happy and healthy 2019.
I have edit some of your lines like below. I thought with these extra lines I could get rid of these links, but whatever I try, they seems to be unmovable. Can you advise please?
Thanks and regards,
Ed
Hi Ed,
Thank you! Have a great year too! 😊
Please try to add a priority to this filter:
add_filter ( 'woocommerce_account_menu_items', 'misha_remove_my_account_links', 9999 );
Does anyone know how to add an icon next to the cart icon in the header of storefront that will lead to account sign in page?
Hi Misha thanks pretty much for this post. Happy New Year to you
Can we do pagination on the pages of my account? Example I have done one page with name
/my-account/sale
There I get all products with the sale page and I need to get also
/my-account/sale/page/2
/my-account/sale/page/3
And etc
Do you have any thoughts on this? =)
Happy New Year! 🎄🙃
You definitely can do it with the URLs like this
/my-account/sale/?page=2
, not sure if it is possible to add one more rewrite endpoint withadd_rewrite_endpoint()
.Thanks for your reply!
Maybe someone will be interested in how to do it.
All as in your manual, except for the pair of moments.
First we have to create and include our file, coz the raw code inside won’t work for the pagination.
Second we need to create own query variable
And then we can catch out query and to use in the pagination like in an usually loop =)
The filter
query_vars
is outdated. You need to usewoocommerce_get_query_vars
filterHi Misha
For some reason I can’t find the account endpoints anywhere in the Woocommerce plugin. When I go the Accounts & Privacy tab it’s no where to be seen. Any idea where it might be?
Many thanks
Oooop found it!
Hi Simon,
great 🙃
Nice article. Really helpful.
Thanks for the easy css to add Font Awesome icons to My Account!
Hi Misha, thank you for this tutorial. Is there any way in My Account to only show the “Payment Methods” link after the user fills in a “Billing Address?” I do not want the user to add a Payment Method until after they have added their Billing Address.
Thank you!
JNT
Hey Jim,
Yes, you could try a condition like this:
Thanks so much for your help! I will try this code. Have a great day! Jim
You’re welcome! 🙃
Hi Misha,
I need the purchase notes of products that customer has purchased to be displayed on customer’s Dashboard. Can you please help with that.
Thanks a lot in advance..
Hi,
I think this should help.
You are a godsend. Thank you so much for the amazingly clear code, comments and explanations!!!
I have never programmed with PHP before but I could make the necessary changed to add a new tab to “My Account” in my website.
One thing I noticed was that, going into “Account Endpoints” and removing the endpoint for the Tab you want to remove was enough, it would both lead the URL to 404 and remove it from the My Accounts tab. So no code was needed.
Also, if someone wants to add a shortcode within their newly created tab they can just use
Hi Khan,
Thank you! :)
Hello Misha
Thank you for the very easy-to-understand commentary.
I was very helpful because I was worried about how to add a menu.
But I still have one problem.
For example, what should I do if I want to link a tag like
<?php echo bp_user_link(); ?>
instead of the usual URL?Well, I would like to know if you know.
I am a Japanese student and I am not good at English or programs.
I am sorry because it is difficult to understand.
Hello,
Please, check this.
I appreciate your kindness.
Sorry for asking basic questions.
Completed without incident.
Very useful, thanks very much
Hi Misha,
Thank you very much for your amazing work !
I’m having a hard time removing the “my account” menu from my homepage, do you know what’s the way ?
Thank you for your time :)
Hi Tristan,
I think there is no advise for everyone and depends on your theme… :)
Thanks for the tutorial, very well explained.
I have added the menu link successfully. But on this new menu page i want to list all products from a specific product category in a table form like the orders page. How i do this?
Hi George,
You can use
get_posts()
,WP_Query
,wc_get_products()
orWC_Product_Query
any of these, depending on which one you like the most.Hi Misha,
Thank you for all of the helpful information.
Regarding the easiest part the tutorial – Removing Tabs from the My Account Menu
I added the filter code you provided – the function
misha_remove_my_account_links
– to the top of my functions file just after:Hey Misha,
Nevermind. I tried it again from scratch and this time it worked. All’s well.
Thanks again,
Ryan
Hey Ryan,
Awesome! 🙃
Thanks a lot for the help. I want to add target=’_blank’ to the external URL. It is possible?
Yes, but unfortunately only with JavaScript. Example for “Downloads” link:
I am a fan of your site and keep following the site.
I have a custom function needed. Instead of endpoints, I need to show all items, orders, etc on one page and update data using ajax. Would you be able to give any hint of how to proceed on same?
Hi and thank you!
Of course I can give you a hint, I would recommend you do display all the necessary stuff on a custom page and remove all the other pages.
As for AJAX request, I can either recommend to type “ajax” in search on my website and explore the different examples there or contact me and my team, we can develop everything for you.
Hi, Misha. Thanks for this guide. I have a question though. What if I want to remove that paragraph under Hello, Name, Is there a way to remove the paragraph below the first line? Hello [Name] (Not Name?) Account Details & Logout, so if that paragraph can’t be removed, then is there a way to directly show users the account edit section instead?
Hi There!
WooCommerce support sent me your way…. So here’s my question, if you could help?
I need to be able to hide the Subscription option on the My Account menu if the user is not a subscriber. Any help would would be much appreciated.
Thanks!
Meredith
Hi Meredith,
Let me clarify – you’re using WooCommerce Subscriptions plugin, right?
You’re amazing Misha
Thanks, you too ;)
Fabulous!!! Wow, so happy u posted & explained this!
Thank you!!!
Nice piece of work! Is there a way to set the external link return $url to open in a new browser tab or window? Thank you kindly!