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
ThemeShaper Forums » Thematic
change wording in password protected page in wordpress
(6 posts)-
Posted 1 year ago #
-
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 WebDesignAndSuch.com Members. Please enter your password:', $content); return $content; } add_filter('the_content','change_pw_text');Posted 1 year ago # -
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/katie-byrne.com/wp-content/themes/mincarliethematic/functions.php 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 1 year ago # -
unexpected function probably means that whatever you had previously didn't end properly. make sure the previous line ends with a ;
Posted 1 year ago # -
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 1 year ago # -
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 1 year ago #
Topic Closed
This topic has been closed to new replies.