This is probably a longshot but I'm out of ideas.

When a user registers on my WordPress site (using WordPress core registration form) it sends an email with the standard "...to set your password, visit the following address..." message. However, with my custom theme there are no query strings at the end of the link, so it just goes to example.com/wp-login.php

I disabled my theme and registered another user and that email did have the necessary query strings.

While I was glad to see it worked, I'm now completely stumped as to why my theme is stripping them off.

I do have some custom security functions, but the only thing that targets the login page is after a user triggers an invalid login attempt using the login_errors hook.

I also have the WordFence plugin active, but it was also active when I changed themes and had success.

I hope this question isn't too vague. I'm just looking for troubleshooting steps for this

  • Do you happen to have a function called wp_new_user_notification in your custom theme? Mar 11, 2016 at 1:46
  • Thanks for the response. I just searched the parent theme, child theme, and all plugins and nothing uses that function. Mar 11, 2016 at 3:20

1 Answer 1


I found that I was setting the default mime type for wp_mail_content_type to be text/html which according to the notes on the codex can cause this particular issue.

I've removed the code from my functions file, and the registration email looks better, but (and I haven't seen WordPress's emails in a long time) still doesn't look 100% normal... I need to find another self-hosted WordPress site that allows registration to compare, but is the activation email supposed to look like this?

enter image description here

It's odd to me that there are two links in the email- one with the proper query strings, and another without. Just doesn't seem that user-friendly- is that correct?

Anyway, if anyone else runs into this same issue- the current solution for me was to entirely remove the custom wp_mail_content_type function that changes the default MIME type for WordPress email to be HTML.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.