方法二,修改主题文件
// 修改WordPress密码保护文章留言信息提示文字:
add_filter( ‘the_password_form’, ‘dw_custom_password_form’ );
function dw_custom_password_form() {
global $post;
$label = ‘pwbox-‘.( empty( $post->ID ) ? rand() : $post->ID );
$o = ‘<form class=”protected-post-form” action=”‘ . get_option(‘siteurl’) .
‘/wp-login.php?action=postpass” method=”post”>
‘ . __( “<p>密码保护文章,你必须输入正确的密码才能访问:</p>” ) . ‘
<label for=”‘ . $label . ‘”>’ . __( “Password:” ) . ‘ </label><input name=”post_password”
id=”‘ . $label . ‘” type=”password” size=”20″ /><input type=”submit” name=”Submit” value=”‘ .
esc_attr__( “Submit” ) . ‘” />
</form>
‘;
return $o;
}