put a tab in my wordpress menu, that like to the buddy press profile and its dynamic.

hello, well i read a topic about that question here

https://buddypress.org/support/topic/adding-dynamic-profile-link-to-main-menu-item/

i add the code proposed in the function.php of my theme ( i tried the wordpress theme and also the buddypress default theme )but both did not work

how can i do to fix that issue

thanks