Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 12-31-2008, 12:16 PM   #1
Marketing Genious
 
Join Date: May 2006
Location: , Sheffield, United Kingdom.
Posts: 494
Thanks: 12
Thanked 0 Times in 0 Posts
Contact Info
Send a message via Skype™ to DannyClare
Default Changing Password Protected Message on Wordpress

Hi Warriors,

I have setup a new blog at The Profit Boost and I am trying to load it with content for the new year.

I want some of my posts to be password protected, which I have managed to do as you can see. But the little message I want to change so it basically tells the visitor to subscribe so they can read the post.

I did find some info on google (an old post in the wordpress forums I think) but I followed the steps and it didn't work.

Can anyone help with this?

Thanks
Danny Clare
DannyClare is offline   Reply With Quote
Old 12-31-2008, 12:40 PM   #2
Marketing Genious
 
Join Date: May 2006
Location: , Sheffield, United Kingdom.
Posts: 494
Thanks: 12
Thanked 0 Times in 0 Posts
Contact Info
Send a message via Skype™ to DannyClare
Default Re: Changing Password Protected Message on Wordpress

Hey Jeff,

Yup, that is exactly what I tried. It really messed up my page and panel. I can copy the code I used here if you want?

function replace_the_password_form($content) {
global $post;
// if there's a password and it doesn't match the cookie
if ( !empty($post->post_password) && stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH])!=$post->post_password ) {
$output = '

<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="post_password">Passwort:</label>
<input name="post_password" class="input" type="password" size="20" />
<input type="submit" name="Submit" class="button" value="'.__("Submit").'" />

</form>

';
return $output;
}
else return $content;
}
add_filter('the_content','replace_the_password_for m');




I really just wanted it to basically say, whack you details in the box on the right. With this code I just pasted it into the bottom of the functions.php file and it didn't work too well....

Thanks for your help Jeff,
Danny Clare
DannyClare is offline   Reply With Quote
Old 12-31-2008, 01:04 PM   #3
Marketing Genious
 
Join Date: May 2006
Location: , Sheffield, United Kingdom.
Posts: 494
Thanks: 12
Thanked 0 Times in 0 Posts
Contact Info
Send a message via Skype™ to DannyClare
Default Re: Changing Password Protected Message on Wordpress

Hey Jeff!

Fantastic! You sussed it! The stupid fool I am, I didn't put it inside of the php tags LOL. Can not believe I made such a silly mistake!

Thanks for your help Jeff, I owe you one, have a good new year!
Danny Clare
DannyClare is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum

Tags
changing, message, password, protected, wordpress

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 10:55 AM.