Getting a blank page when I style the comments in functions.php
-
Hi everyone,
I’m absolutely stumped as to what is wrong and have tried all the fixes I can find on the web.
I want to edit my comments section, and I’ve managed to do that by adding some code to the functions.php file I found on another site.
However when the comment is submitted it just goes to a blank page. The link for the blank page is https://peterahrens.com.au/wp-comments-post.php.
When this code is in the functions.php file, every time I activate or deactivate a plugin it also goes to a blank page.
Taking the code away makes everything run fine.
The code in my functions php file is
<?php //this function will be called in the next section function advanced_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"> <div class="comment-author vcard"> <?php echo get_avatar($comment,$size='48',$default='<path_to_url>' ); ?> <div class="comment-meta"<a href="<?php the_author_meta( 'user_url'); ?>"><?php printf(__('%s'), get_comment_author_link()) ?></a></div> <small><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?><?php edit_comment_link(__('(Edit)'),' ','') ?></small> </div> <div class="clear"></div> <?php if ($comment->comment_approved == '0') : ?> <em><?php _e('Your comment is awaiting moderation.') ?></em> <br /> <?php endif; ?> <div class="comment-text"> <?php comment_text() ?> </div> <div class="reply"> <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> </div> <div class="clear"></div> <?php } ?>
I’ve tried using the default comments.php file and it acts the same. I’ve tried deactivating all plugins and that doesn’t help.
My website is at https://www.peterahrens.com.au. I would really really appreciate any help.
Thanks,
Peter
- The topic ‘Getting a blank page when I style the comments in functions.php’ is closed to new replies.