ThemeShaper Forums » Thematic


change wording in password protected page in wordpress

(6 posts)
  • Started 7 years ago by Colleen
  • Latest reply from helgatheviking
  • This topic is resolved
  1. Hi
    I have installed thematic and installed the child theme. I need to change the text on a password protected page - "This post is password protected. To view it please enter your password below:" when it first appears on the password protected page. Can someone please help?
    regards Colleen

    Posted 7 years ago #
  2. sowingseeds

    I have successfully used code from this page:
    Web Design and Such

    function change_pw_text($content) {
    $content = str_replace(
    'This post is password protected. To view it please enter your password below:',
    'This page is for Members. Please enter your password:',
    return $content;
    Posted 7 years ago #
  3. Hi
    I pasted the above code into the bottom of my functions.php file of my thematic child theme however I get this error.

    Parse error: syntax error, unexpected T_FUNCTION in /home/kaitbyr/ on line 56

    Line 56 is where this function starts. Should I leave a gap between what I have and where this one starts?

    Can you tell me what I am doing wrong please.

    Posted 7 years ago #
  4. unexpected function probably means that whatever you had previously didn't end properly. make sure the previous line ends with a ;

    Posted 7 years ago #
  5. Thank you so much. That worked. Such a little thing but it can create a nightmare when you don't know what you are doing. Again thank you.

    Posted 7 years ago #
  6. as a tip, the line where the error is reported is not always the line where the error actually IS. always check just before that. syntax errors suck, but they're not so bad to fix... you just need to mind your p's and q's.... or your {}(),; and "

    Posted 7 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.