I am working on wordpress with buddypress platform and I am using wplms theme. Actually the issue is I want to restrict the user if his profile is not complete and also want to show “Please fill the required fields” message.
I am able to restrict the user but not able to show “Please fill the required fields” message.
Thank you for the details. Please let me know are you getting default notices like “Profile updated” correctly or not. If not, It seems your theme not firing action name “template_notices” that causing the issue.
- This reply was modified 2 years, 8 months ago by Ravi.
When I set restrict to profile only as yes, I am able to restrict the user, but “Please fill the required fields” message is not displayed.
When I set restrict to profile only as no, I am not able to restrict the user, but “Please fill the required fields” message is displayed.
So I want to restrict the user as well as show “Please fill the required fields” message to user.
Thank you for sharing the details.
It seems to me that your theme lacks the template_notices action on profile pages.
You can verify it by adding
<?php do_action( 'template_notices') ;?>
if using BuddyPress legacy template pack or if you have BuddyPress Noveau template pack enabled, you can use this
<?php bp_nouveau_template_notices(); ?>
and see if the notice is shown or not.
We use BuddyPress’s API for adding notice. To render the notice, the theme needs to have the above snippet or a variant of it for Nouveau.
Please let me know if that works or not?
I am sorry, I did not see your reply earlier.
1. The code should not go to buddypress-functions.php. They will have no effect in it.
2. Please put it somewhere in your theme/child theme’s header for testing
3. If you are using Nouveau template, only then use the 2nd code, otherwise that may cause fatal error(you can check the template pack from dashboard->settings->BuddyPress->Options)
Please let me know how it goes.
I am using buddypress legacy template pack, I tried adding code in header but it did not worked.
I referred below link and tried doing all these suggestions, but did not worked
Please let me know what should be done.
You must be logged in to reply to this topic.