WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mjtys
    Member
    Posted 3 years ago #

    Hi there,

    Can someone maybe help me please? After modifying the comments.php for the LightWord 2.0.0.6 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(); } ?>
    <?php
    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>';
    return;
    }

    Thank you

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 3 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
    Member
    Posted 3 years ago #

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

  4. RD13
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags