简体   繁体   中英

woocommerce add subtitle on menu navigation on my account

i got in stuck with a customization that i want to do on myaccount navigation menu in the Woocommerce account.

I want to add inside the li tag a subtitle under the menu item name, the item that he get from wc_get_account_menu_items() function, but it doesn't have any subtitle in the $item.

How can i customize it in order to insert it in the navigation.php

I attach a file where it shows how it have to be rendered

I thought to insert an action at wc_get_account_menu_items in order to add teh subtitle but i can't figure out how :(

Thank you

Mirko 导航

You can't get the HTML you required (as per screenshot) using woocommerce_account_menu_items() filter or any other filter.

So if you need the same structure, it is better to hard code the links & HTML in your theme by copying navigation.php from wp-content\\plugins\\woocommerce\\templates\\myaccount to wp-content\\themes\\your-theme\\woocommerce\\myaccount .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM