jane_l 3 Report post Posted July 11, 2011 Are there any other hooks for comments? Because I am trying to get something to show up inside the individual comment loop and I tried using "pagelines_inside_bottom_pl_comments" and "pagelines_after_pl_comments" but both hooks put the function after the comment input box. I looked at the additional hooks but none of them pertain to the comments. Help? You can see the "Edit" link underneath the comment box here: http://dearauthor.com/book-reviews/overall-a-reviews/a-minus-reviews/review-a-night-of-scandal-by-sarah-morgan/ Share this post Link to post Share on other sites
cmunns 16 Report post Posted July 11, 2011 you would have directly edit the template for comments if you want a more specific injection of code. In your child theme you'd need to create your own comments.php file and also add a file called template.comments.php with this in it ` global $post; comments_template(); ` Share this post Link to post Share on other sites
jane_l 3 Report post Posted July 12, 2011 Where do I find the comments.php array? I want to keep the same styling but just add a php link. Share this post Link to post Share on other sites
timlinson 3 Report post Posted July 12, 2011 comments.php is a file located in the first level of the platformpro folder. Share this post Link to post Share on other sites
jane_l 3 Report post Posted July 12, 2011 Right, but it just calls to the wp comments list <ol class="commentlist"> <?php wp_list_comments(array('avatar_size' => 45)); ?> Is there some special pagelines comment code or is it standard wordpress stuff? I.e., I can just replace that with: <div id="comment-<?php comment_ID(); ?>" class="comment-body"> <div class="comment-body-inner"> <div class="comment-avatar"> <?php echo get_avatar($comment, $size = '45', $default = get_bloginfo('stylesheet_directory').'/images/default-avatar.png' ); ?> </div> <!-- END avatar --> <div class="comment-author vcard"> <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?> </div> <!-- END comment-author vcard --> <?php if ($comment->comment_approved == '0') : ?> <?php _e('Your comment is awaiting moderation.') ?> <?php endif; ?> <div class="comment-meta commentmetadata"> comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?> <?php edit_comment_link(__('(Edit)'),' ','') ?> </div> <!-- END comment-meta commentmetadata -->[/code] Share this post Link to post Share on other sites
Simon 248 Report post Posted July 12, 2011 Have you tried using the core comments filters? http://codex.wordpress.org/Plugin_API/Filter_Reference#Comment.2C_Trackback.2C_and_Ping_Filters Share this post Link to post Share on other sites
jane_l 3 Report post Posted July 12, 2011 Actually, I think what I need to do is replace the wp_list_comments() function call in the comments.php file akin to what is suggested here. Share this post Link to post Share on other sites
Simon 248 Report post Posted July 12, 2011 I see those tutorials do not have dates, that one is replacing the old comments method, I think it was 2.8 or 2.9 the comments loop was refined and the main reply section was handled in wordpress core. So you would be taking a step backwards. What exactly are you trying to insert and where? Share this post Link to post Share on other sites
jane_l 3 Report post Posted July 12, 2011 I was trying to insert some php code so that my users could edit their comments (I don't want to use AEC bc that is a bloated plugin). In the end, I used the code suggested here and it worked perfectly. The other link had you create a php file, but it is better to insert the function code in the function.php file. Thanks for trying to help. At least you led me in the right direction. Share this post Link to post Share on other sites
Kate 3 Report post Posted July 12, 2011 Thanks for posting back with your solution, Jane. Share this post Link to post Share on other sites