WP-Members: Membership Framework
[resolved] [Plugin: WP-Members] Parse Error from comments.php in LightWord (4 posts)

  1. mjtys
    Posted 5 years ago #

    Hi there,

    Can someone maybe help me please? After modifying the comments.php for the LightWord theme generates this error:

    Parse error: syntax error, unexpected '>' in /xxx/xxx/public_html/phdblog/wp-content/themes/lightword/comments.php on line 2

    The first 11 lines of comments.php are as follows:

    <?php if (!is_user_logged_in() && !get_post_custom_values('unblock')) { $post-
    >post_password = wpmem_generatePassword(); } ?>
    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    die ('Please do not load this page directly. Thanks!');
    if ( post_password_required() ) {
    echo '<p class="nocomments">';
    echo _e('This post is password protected. Enter the password to view comments.','lightword');
    echo '</p>';

    Thank you


  2. Chad Butler
    Plugin Author

    Posted 5 years ago #

    The script for WP-Members should be one line. What you have has a carriage return (as opposed to word-wrapped text) to the second line.

    Should be $post->post_password = wpmem_generatePassword();

    Hope that helps...

  3. mjtys
    Posted 5 years ago #

    Thank you! That works just great - wish I'd have noticed that one myself!

  4. RD13
    Posted 5 years ago #

    Thank you, solved the exact same problem I experienced :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic