Title: shatterjack's Replies | WordPress.org

---

# shatterjack

  [  ](https://wordpress.org/support/users/shatterjack/)

 *   [Profile](https://wordpress.org/support/users/shatterjack/)
 *   [Topics Started](https://wordpress.org/support/users/shatterjack/topics/)
 *   [Replies Created](https://wordpress.org/support/users/shatterjack/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/shatterjack/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/shatterjack/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/shatterjack/engagements/)
 *   [Favorites](https://wordpress.org/support/users/shatterjack/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 38 total)

1 [2](https://wordpress.org/support/users/shatterjack/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/shatterjack/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/shatterjack/replies/page/2/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Content Has Disappeared After An Update (not sure which one)](https://wordpress.org/support/topic/content-has-disappeared-after-an-update-not-sure-which-one/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/content-has-disappeared-after-an-update-not-sure-which-one/#post-10328152)
 * Hi James,
 * Thanks a lot for your reply, the plugins didn’t make a difference, if I switch
   to another theme I see the posts so I’m pretty sure it’s the theme, the thing
   is that the theme is a pretty custom one I kind of scrapped together, and over
   time I think that some update eventually made it non-functioning. The header 
   and footer appear, just none of the posts of the body. Is there a way to run 
   an older version of wordpress to see if it will work? Or any other suggestion
   you have would be great. Thanks a lot
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Categories and tags of posts in database](https://wordpress.org/support/topic/categories-and-tags-of-posts-in-database/)
 *  [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/categories-and-tags-of-posts-in-database/#post-1098444)
 * yeah man come on that’s not helpful
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [comments like facebook?](https://wordpress.org/support/topic/comments-like-facebook/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/comments-like-facebook/#post-1453373)
 * Hey Shane thanks for the links but I am looking for the function of style of 
   the facebook comments but not actually importing my facebook comments. That finosforum
   page shows a link below a post when, if clicked on, expands a list of comments
   for that post. Anything like that?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [submitted comment not increasing comment_count](https://wordpress.org/support/topic/submitted-comment-not-increasing-comment_count/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/submitted-comment-not-increasing-comment_count/#post-1369676)
 * when there is an unapproved comment and I approve it in the dashboard, it updates
   the comment_count automatically for that post, but then if I post to it while
   I am logged in, it does not update it. What am I doing wrong with that code above?
   Thanks…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [submitted comment not increasing comment_count](https://wordpress.org/support/topic/submitted-comment-not-increasing-comment_count/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/submitted-comment-not-increasing-comment_count/#post-1369641)
 * I’ve tried doing an INSERT to add the new comment, and an UPDATE to update the
   comment_count:
 *     ```
       mysql_query ("INSERT INTO wp_comments(comment_content, comment_author, comment_post_ID) VALUES ('$_POST[commenty]', '$_POST[author]', '$_POST[number_of_the_post]')");
                           mysql_query ("UPDATE wp_posts SET comment_count=comment_count+1 WHERE comment_post_ID = '$_POST[number_of_the_post]'");
       ```
   
 * The comment gets added but the comment_count doesn’t increase…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [submitted comment not increasing comment_count](https://wordpress.org/support/topic/submitted-comment-not-increasing-comment_count/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/submitted-comment-not-increasing-comment_count/#post-1369573)
 * does anyone know how comment_count gets its value?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Comments ‘submit’ button broken](https://wordpress.org/support/topic/comments-submit-button-broken/)
 *  [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/comments-submit-button-broken/#post-1369332)
 * did you enable comments in settings?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [insert comment into database?](https://wordpress.org/support/topic/insert-comment-into-database/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/insert-comment-into-database/#post-1350117)
 * I have been testing if the comments are being submitted with this code and variations
   of it. I have solved the string offset error, but now when I click submit, it
   just returns the same page as before, and no comment shows up. Also I just noticed,
   when I log in to the dashboard, it says I have 264 comments approved when there
   are only 11 appearing. When I click on the comments menu item on the left side
   in dashboard, it says “listing comments 1-200” but only shows they 11 comments
   that have displayed on the main page. I’m worried that the test comments are 
   being inserted into the database but in the wrong place. How can I check this?
 * Here is the latest form code:
 *     ```
       $post_id = $post['post_id'];
                           echo '<form method="POST" action='.$_SERVER['PHP_SELF'].' Comment <input type="text" name="comment"/>';
   
                           if ($user_ID) {
                                echo '<input type="text" name="author" style="display:none" value="$user_login"/>';
                                echo "  ready to comment as $user_login";
                           }
   
                           else echo 'Name <input type="text" name="author"/>';
                           echo '<input type="text" name="post_id" style="display: none;" value="'.$post_id.'"/>';
                           echo '<p><input name="submit_comment" type="submit" id="submit" value="submit" tabindex="5" /></p>';
   
                           if (empty($_POST['submit_comment']) || !(($post_id = (int) $_POST['submit_comment']) > 0)) {
                                # bad comment_ID;
                           }
   
                           if (isset($_POST['submit_comment'])) {
   
                                $_POST[author]=mysql_real_escape_string($_POST[author]);
                                $user_login=mysql_real_escape_string($user_login);
                                $_POST[comment]=mysql_real_escape_string($POST[comment]);
   
                                mysql_query("INSERT INTO wp_comments(comment_author, u.id, comment_content) VALUES ('$_POST[author]','$user_login', '$_POST[comment]')");
                           }
   
                           echo '</form>';
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [wp_get_recent_posts includes drafts?](https://wordpress.org/support/topic/wp_get_recent_posts-includes-drafts/)
 *  [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/wp_get_recent_posts-includes-drafts/#post-1351343)
 * check [this](http://www.smashingmagazine.com/2008/12/18/8-useful-wordpress-sql-hacks/)
   page out about how to delete post revisions. I found that wordpress keeps all
   the draft versions of a post. There’s a value in the post table of the database
   for post_type=post for the actual post and draft for the drafts.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [insert comment into database?](https://wordpress.org/support/topic/insert-comment-into-database/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/insert-comment-into-database/#post-1350017)
 * i switched method and action accidentally but it still won’t insert the comment.
   If I use
 * action=’.$_SERVER[‘PHP_SELF’].’
 * it gives me a fatal error – Cannot use string offset as an array
 * for this line: $author[$row[‘user_nicename’]][] = $row;
    which is from an earlier
   part of the code and works fine until I click to submit a comment. Here is the
   newest form code:
 *     ```
       $post_id = $post['post_id'];
                 echo '<form method="POST" action='.$_SERVER['PHP_SELF'].' Comment <input type="text" name="comment"/>';
   
                 if ($user_ID) {
                      echo '<input type="text" name="author" style="display:none" value="$user_login"/>';
                      echo "logged in as $user_login";
                 }
   
                 else echo 'Name <input type="text" name="author"/>';
                 echo '<input type="text" name="post_id" style="display: none;" value="'.$post_id.'"/>';
                 echo '<p><input name="submit" type="submit" id="submit" value="submit" tabindex="5" /></p>';
   
                 if (empty($_POST['comment_post_id']) || !(($post_id = (int) $_POST['comment_post_id']) > 0)) {
                      # bad comment_post_id;
                 }
   
                 $sql=("INSERT INTO wp_comments(comment_author, user_id, comment_content) VALUES ('$_POST[author]','$user_login', '$_POST[comment]')");
                 echo '</form>';
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if I don’t use WP_Query, how can I get the comment form to display?](https://wordpress.org/support/topic/if-i-dont-use-wp_query-how-can-i-get-the-comment-form-to-display/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/if-i-dont-use-wp_query-how-can-i-get-the-comment-form-to-display/#post-1331190)
 * I can hard-code the form field by inserting the form portion of the comments.
   php file into my index.php file, but when I click “submit” on the comment, I 
   get a 404 error which says “wp-comments-post.php does not exist”
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if I don’t use WP_Query, how can I get the comment form to display?](https://wordpress.org/support/topic/if-i-dont-use-wp_query-how-can-i-get-the-comment-form-to-display/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/if-i-dont-use-wp_query-how-can-i-get-the-comment-form-to-display/#post-1331162)
 * sorry to bump but I’ve been trying to fix this for almost a month and I’ve gotten
   nowhere and my posts just get buried…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [if I don’t use WP_Query, how can I get the comment form to display?](https://wordpress.org/support/topic/if-i-dont-use-wp_query-how-can-i-get-the-comment-form-to-display/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/if-i-dont-use-wp_query-how-can-i-get-the-comment-form-to-display/#post-1331158)
 * shoot I was hoping if I posed it as a challenge I might get more responses…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [“comments are closed” when they should be open!](https://wordpress.org/support/topic/comments-are-closed-when-they-should-be-open/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/comments-are-closed-when-they-should-be-open/#post-1322610)
 * I couldn’t find “have_comments” in my comments.php so I don’t think that’s it.
   I know it’s going through my comments.php file because I tweaked it and I got
   an error. It’s just, I don’t think I’m going about doing my page in the way that
   wordpress likes, and not the way anyone else has done so I’m having a real hard
   time finding help in past posts. Because I am customizing the order and arrangement
   of the posts, I have to output them in a similar way and I’ve gotten everything
   to output eventually except the field to type in your comment and register. It’s
   very elusive for me!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [“comments are closed” when they should be open!](https://wordpress.org/support/topic/comments-are-closed-when-they-should-be-open/)
 *  Thread Starter [shatterjack](https://wordpress.org/support/users/shatterjack/)
 * (@shatterjack)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/comments-are-closed-when-they-should-be-open/#post-1322607)
 * the thing is that my comments are outputting ok for each post, but just not the
   field to type in new comments (they were added before I changed my whole theme
   code around).

Viewing 15 replies - 1 through 15 (of 38 total)

1 [2](https://wordpress.org/support/users/shatterjack/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/shatterjack/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/shatterjack/replies/page/2/?output_format=md)