Hi,
I’m using the church child theme. I have a password protected page and would like to change the default wp text. My site is http://www.mybedwettingcure.com
After searching the wp forums, I understand that I need to create an empty functions.php file and add code to it.
I looked at the files on my admin dashboard and see that there already is a function.php file in church.
Would I paste the code at the end of that file?
Here is the code wp says to use:
function my_password_form() {
global $post;
$post = get_post( $post );
$label = ‘pwbox-‘ . ( empty($post->ID) ? rand() : $post->ID );
$output = ‘<form action=”‘ . esc_url( site_url( ‘wp-login.php?action=postpass’, ‘login_post’ ) ) . ‘” class=”post-password-form” method=”post”>
‘ . __( ‘This content is certainly password protected. To view it please enter your password below:’ ) . ‘
<label for=”‘ . $label . ‘”>’ . __( ‘Password:’ ) . ‘ <input name=”post_password” id=”‘ . $label . ‘” type=”password” size=”20″ /></label> <input type=”submit” name=”Submit” value=”‘ . esc_attr__( ‘Submit’ ) . ‘” />
</form>
‘;
return $output;
}
add_filter(‘the_password_form’,’my_password_form’);
Thank you for your help,
Jeannie