Change the items in the drop-down menu
Hi everyone,
I was wondering how can I change the items in the dropdown menu? I would like to remove some sections that I’m not using.
I searched a lot and I didn’t find anything which might help me to fix my issue.
Could someone tell me which file I need to edit?
Thank you,
Audran 🙂
PS: I’m actually using Askbug
![](https://secure.gravatar.com/avatar/811744dc06cee44c97508003effe26e6?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F473447ac58e1cd7e96172575f48dca3b.jpg&r=g)
3.0.7 🙂
![](https://secure.gravatar.com/avatar/811744dc06cee44c97508003effe26e6?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F473447ac58e1cd7e96172575f48dca3b.jpg&r=g)
up please
Please tell me which items you want to remove or modify. I will show the exact code for that purpose
Hello,
Sorry for late replay. here is an example:
function my_ap_user_menu( $menus ) { // var_dump( $menus ); // This will show all menu items. if ( isset( $menus['notifications'] )) { unset( $menus['notifications'] ); } } add_filter( 'ap_user_menu', 'my_ap_user_menu' );
This above code will remove notifications item from user menu.
![](https://secure.gravatar.com/avatar/ce31e2aed5ae4ffd4d35961240267260?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F4764f37856fc727f70b666b8d0c4ab7a.jpg&r=g)
Hi man ! Thank you so muck for answering, but when we past it into the ‘function.php’ file, it delets all the items. Not only ‘notifications’. Is there anything to do about that ?
![](https://secure.gravatar.com/avatar/ce31e2aed5ae4ffd4d35961240267260?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F4764f37856fc727f70b666b8d0c4ab7a.jpg&r=g)
And it delets all the items even with :
function my_ap_user_menu( $menus ) {
var_dump( $menus );
}
add_filter( ‘ap_user_menu’, ‘my_ap_user_menu’ );
So i don’t understand … Have you got any idea what should i do ?
Please read the basics of WordPress filter in wp.org. You must return in filter callback.
![](https://secure.gravatar.com/avatar/ce31e2aed5ae4ffd4d35961240267260?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F4764f37856fc727f70b666b8d0c4ab7a.jpg&r=g)
So I apply ‘my_ap_user_menu’ to ‘ap_user_menu’ by adding :
add_filter( ‘ap_user_menu’, ‘my_ap_user_menu’ );
In ‘hooks.php’ ?
And then i add the function
‘my_ap_user_menu’ in ‘functions.php’ ?
Hello Rahul Aryan,
I got the same issue, but I have to admit that I don’t understand how does “apply_filters()” works, and then, how to edit the dropdown menu.
If the dropdown menu “Extract menu from registered user pages” do I have to delet the pages I don’t need ?
Thank you for spending time to answer us 🙂
Wallpou (Anspress 3.0.7 + askbug theme)
Please tell me which items you want to remove or modify. I will show the exact code for that purpose
![](https://secure.gravatar.com/avatar/811744dc06cee44c97508003effe26e6?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F473447ac58e1cd7e96172575f48dca3b.jpg&r=g)
We are on the same team so we need to remove: Notification, Reputation, Question, Answer, Followers and Following
Thank you so much for your help
![](https://secure.gravatar.com/avatar/811744dc06cee44c97508003effe26e6?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F473447ac58e1cd7e96172575f48dca3b.jpg&r=g)
up please 🙂
![](https://secure.gravatar.com/avatar/ce31e2aed5ae4ffd4d35961240267260?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F4764f37856fc727f70b666b8d0c4ab7a.jpg&r=g)
up
![](https://secure.gravatar.com/avatar/c56c012899e6de744ce6b5dc391ffe4e?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2Fcb70ab375662576bd1ac5aaf16b3fca4.jpg&r=g)
Can you please stop this “UP” thing ? Not polite and confusing for all of us.
![](https://secure.gravatar.com/avatar/ce31e2aed5ae4ffd4d35961240267260?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F4764f37856fc727f70b666b8d0c4ab7a.jpg&r=g)
I agree this is not polite but we really need to remove a those items. :/ More over the ticket is now open for 10 days and our issue is becoming urgent :s
![](https://secure.gravatar.com/avatar/811744dc06cee44c97508003effe26e6?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2F473447ac58e1cd7e96172575f48dca3b.jpg&r=g)
I agree with TheWallpou, if someone can help us ! We are in the team so one answer will be enough !
![](https://secure.gravatar.com/avatar/c56c012899e6de744ce6b5dc391ffe4e?s=30&d=https%3A%2F%2Fanspress.net%2Fwp-content%2Fuploads%2Fap_avatars%2Fcb70ab375662576bd1ac5aaf16b3fca4.jpg&r=g)
ok, guys then everybody should fill this forum-like support system with UPs.
Good luck.
AnsPress 4.0 or 3.x?