未在注册电子邮件中发送设置密码的正确链接

时间:2018-12-13 作者:sh.dehnavi

这是一个大问题。当一个新用户在我的网站上注册时,像往常一样,wordpress会向他/她发送一封电子邮件,以便设置他的/她的密码
将发送电子邮件,但链接不正确。是这样的:

Username: username To set your password, visit the following address:  
http://end-eng.com/wp-login.php 
如您所见,该链接是用于登录页面,而不是用于设置密码!!!

1 个回复
SO网友:Tejas Gajjar

您需要将post id作为参数传递,并检查它将在函数中给出您想要的结果。php

function tr_count($post_id){  
ob_start();  
the_content();  
$content = ob_get_clean();  
return substr_count($content, \'<tr>\');  
}
单件。php

echo tr_count(get_the_ID());

相关推荐