Text Change on Password Protected Page
-
Hi,
Im using wordpress twentyten and I wanted to change the standard text displayed for a password protected page. I followed the directions for other posts and copied functions.php to my child theme and then edited it by adding the following code to the bottom of my functions.php file:
function my_password_form() { global $post; $label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID); $output = '<div class="password-form"> <p class="protected-text">' . __('This post is password protected. To view it, please enter your password below:') . '</p> <form action="' . get_option('siteurl') . '/wp-pass.php" method="post"> <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') . '" /></p></form></div>'; return $output; } add_filter('the_password_form','my_password_form');
It seemed to work fine and then I got a fatal error. What did I do wrong?
Jeremy
camptopeinu.com
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Text Change on Password Protected Page’ is closed to new replies.