Title: Popup Comments Missing Cookie Code
Last modified: December 23, 2016

---

# Popup Comments Missing Cookie Code

 *  [Nikki](https://wordpress.org/support/users/nikki/)
 * (@nikki)
 * [22 years, 5 months ago](https://wordpress.org/support/topic/popup-comments-missing-cookie-code/)
 * Hello hello.. I did a fresh install for 1.0 and everything was working except
   for the cookie in the popup comments. I think someone forgot to put the code 
   in there, so I extracted the following from wp-comments.php:
    ` $comment_author
   = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['
   comment_author_'.$cookiehash]) : ''; $comment_author_email = (isset($HTTP_COOKIE_VARS['
   comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.
   $cookiehash]) : ''; $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.
   $cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) :'';
   $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID
   = $id AND comment_approved = '1' ORDER BY comment_date"); and placed it here 
   in the wp-comments-popup.php:  <?php // this line is WordPress' motor, do not
   delete it. $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE
   comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date"); $commentstatus
   = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE
   ID = $id"); if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-
   postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't
   match the cookie echo(get_the_password_form()); } else { $comment_author = (isset(
   $HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['
   comment_author_'.$cookiehash]) : ''; $comment_author_email = (isset($HTTP_COOKIE_VARS['
   comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.
   $cookiehash]) : ''; $comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.
   $cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) :'';
   $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID
   = $id AND comment_approved = '1' ORDER BY comment_date"); ?>  And voila! It remembered
   my posting info. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Nikki](https://wordpress.org/support/users/nikki/)
 * (@nikki)
 * [22 years, 5 months ago](https://wordpress.org/support/topic/popup-comments-missing-cookie-code/#post-29654)
 * That is, how to add…
 *  [Laughinglizard](https://wordpress.org/support/users/laughinglizard/)
 * (@laughinglizard)
 * [22 years, 5 months ago](https://wordpress.org/support/topic/popup-comments-missing-cookie-code/#post-29744)
 * Look towards the bottom of the page you are viewing within the wiki. You should
   find an edit button. There are wiki publishing rules explained on every edit 
   page. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Popup Comments Missing Cookie Code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Laughinglizard](https://wordpress.org/support/users/laughinglizard/)
 * Last activity: [22 years, 5 months ago](https://wordpress.org/support/topic/popup-comments-missing-cookie-code/#post-29744)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
