Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

pnilz on "changing password protection wording"

$
0
0

Hey All,

I've got the code in my functions file to change the wording on my password protected page, but I'd like to add some HTML, specifically, a link to another page. When I tried to put this in the code, I got a blank white page. Here's the web page: http://www.wmorris.com/available-work/

Here's the code I'm using:

function my_password_form() {
    global $post;
    $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
    $o = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
    ' . __( "For information and assistance acquiring available glass artwork please see the Galleries page to locate a gallery representing William Morris.<br />
Already have a password? Please login below." ) . '
    <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" maxlength="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
    </form>
    ';
    return $o;
}
add_filter( 'the_password_form', 'my_password_form' );

I'd like to change the text to this:
For information and assistance acquiring glass artwork <a href="/galleries">click here</a> to locate a gallery representing William Morris.
Already have a password? Please login below.

Is this possible? Thanks!


Viewing all articles
Browse latest Browse all 8245

Trending Articles