WordPress.org

Support

Support » How-To and Troubleshooting » Add a link into a filter

Add a link into a filter

  • Hi People,

    Fairly new at adding functions/filters etc…and add the bewlo code to change some custom text…and it worked great…..but how would i add a link to the custom text..??…when i try adding a url “http” its breaking the code…..could someone please point me in the right direction.??

    Cheers in advance if anyone can help

    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 page is password protected. To view it please enter your password below: If you do not have a password then please contact us to request one.") . '
    	<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;
    }
  • The topic ‘Add a link into a filter’ is closed to new replies.
Skip to toolbar