I need to show a site notice / elementor pop up (ideally render a shortcode) to specific users based on what User Meta they have. To be more specific, the user needs to activate their account (link sent via email) after registering. However, even if they don't click on the activation link they still have access to their account.

I want this notice to appear with something like "Please activate your account" at the top of the window.

The User Meta I am referring to is coming from Woo Germanized and is "User Verification". According to the author of Woo Germanized, they are using the standard Woo Verification meta.

I'd appreciate any help/advice here!

Thank you!

  • What about something like this: $is_active = abracadabra_current_user_active() ? true : false; add_action('template_redirect', function() { is_account_page() && $is_active ? 'Activate your account' : ''; }); – Mayeenul Islam Sep 16 at 7:49
  • Thanks for this suggestion. Would I just place this as is in my functions.php file? – Shayne Thomas Sep 17 at 6:52
  • It's just the concept. You have to fill it in with a properly working version of it. And yes, functions.php can be a good starting point, but for a long term solution, a child theme or a plugin would be best. – Mayeenul Islam Sep 17 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.