I want to disable birthdays and anniversaries, and I don’t want the user to be able to choose their Date of Birth. How can I do this?
AI-generated summary
alejandro wants to disable Cakeday, which includes birthdays and anniversaries, and prevent users from choosing their Date of Birth. To achieve this, rishabh suggests searching for “cakeday” in Admin > Settings and disabling the setting. However, this won’t hide the “Cakeday” link from the main menu.
dax provides a CSS solution to hide the Cakeday link inside the hamburger menu and the Date of Birth field on user profiles:
.widget-link.cakeday-link {
display: none !important;
}
.user-custom-preferences-outlet.user-date-of-birth-input {
display: none;
}
The !important in the first CSS rule is necessary to override the existing display property declared in the default stylesheet.
If you’ve installed the plugin then just remove it from your YML and rebuild.
It won’t let me remove the plugin ![]()
is this going to hide the “Cakeday” from the main menu? ![]()
Nope, but you can hide the Cakeday link inside the hamburger menu with
.widget-link.cakeday-link {
display: none !important;
}
and hide the Date of Birth field on the user profile with
.user-custom-preferences-outlet.user-date-of-birth-input {
display: none;
}
What happens if you delete that line from app.yml?
Why is there an “!important” in the first one and not in the second one? ![]()
Because in the first case I have to make CSS understand that the display property that I am declaring now has more importance than the existing one for the same element and already declared previously in the defualt stylesheet
.menu-panel li a.widget-link, .menu-panel li.heading a.widget-link {
display: block;
}
Thanks for the explanation!
