Viewing 8 replies - 1 through 8 (of 8 total)
  • Are you the admin or user of this site?

    If you’re the user, you won’t be able to see the post unless you enter the password you’ve been supplied.

    If you’re the admin, you should be able to edit the post via the admin panel at https://www.spiritgrowth.com/wp-admin/

    Good luck!

    Thread Starter jazfotodesign

    (@jazfotodesign)

    cool the following code worked.

    <?php
    add_filter( 'the_password_form', 'custom_password_form' );
    function custom_password_form() {
    	global $post;
    	$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
    	$o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post">
    	' . __( "This post is password protected. To view it please enter your password below:" ) . '
    	<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;
    }
    ?>

    How can I put a link where the bold text is? <a href="link">doesn’t work

    $o = ‘<form class=”protected-post-form” action=”‘ . get_option(‘siteurl’) . ‘/wp-pass.php” method=”post”>
    ‘ . __( “This post is password protected. To view it please enter your password below:” ) .
    `

    $o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post">
    	' . '<a href="link">' . __( "This post is password protected. To view it please enter your password below:" ) . '</a>' . '
    	<label for="'
    Thread Starter jazfotodesign

    (@jazfotodesign)

    thank you alchymyth, very helpful ??

    I wrote a plugin which will do just this, but without having to modify your core files. You can safely upgrade and not break your modifications:

    Protected Post Personalizer

    Thread Starter jazfotodesign

    (@jazfotodesign)

    Orin, can your plug-in customize individual posts or does it just change what it says for all of them?

    @jazfotodesign It does change the “Protected:” text site-wide, but you can easily remove that text entirely and instead simply title your posts things like “Password Required: New Pictures”.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘edit password protected post text’ is closed to new replies.