Forums

HELP: Comment Error (4 posts)

  1. amodernproposal
    Member
    Posted 2 years ago #

    Hi,

    I upload a new theme that I purchased and it now says the following when you go to post a comment, as an admin I can post a comment but guests cannot:

    Blog

    <input type="text" name="author" id="author" value="
    Fatal error: Call to undefined function esc_attr() in /home/amod/public_html/edmontonweddingplanner/wp-content/themes/tofurious-22/comments.php on line 58

    Any help would be much appreciated. The line it is refering to (#58 in the comments.php file reads:

    <p><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />

  2. amodernproposal
    Member
    Posted 2 years ago #

    BTT - I really need help!

  3. dcannon1
    Member
    Posted 2 years ago #

    I believe the esc_attr() function is now deprecated.

    Not sure what the new equivalent is, but for a quick fix you could replace esc_attr($comment_author) with just $ocmment_author

  4. amodernproposal
    Member
    Posted 2 years ago #

    it didn't work :(

Topic Closed

This topic has been closed to new replies.

About this Topic