Comment popup not displaying comment author info
-
I am using the comment popup in my theme. The comments always seem to display the admin’s “display name” as the author’s name no matter which name is used while making the comment. Also the author’s website URL is not being displayed.
I am facing the same problem with my custom theme as well as other themes – https://www.taly.com.ar/wp-themes/
The site is here –
https://chugsdesigns.com/photoblog/And the comment popup template –
<?php
/* Don't remove these lines. */
add_filter('comment_text', 'popuplinks');
foreach ($posts as $post) { start_wp();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml"><head>
<title><?php echo get_settings('blogname'); ?> - Comments on <?php the_title(); ?></title>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
<style type="text/css" media="screen">
@import url( <?php bloginfo('stylesheet_url'); ?> );
</style></head>
<body id="commentspopup">
<div id="comments">
<div id="comments-header"><div id="comments-header-inner">
<h1>"><?php echo get_settings('blogname'); ?></h1>
<h2>Comments for the post '<?php the_title(); ?>'</h2>
<?php } ?></div></div>
<?php
// this line is WordPress' motor, do not delete it.
$comment_author = (isset($_COOKIE['comment_author_' . COOKIEHASH])) ? trim($_COOKIE['comment_author_'. COOKIEHASH]) : '';
$comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : '';
$comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : '';
$comments = get_approved_comments($id);
$post = get_post($id);
if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
echo(get_the_password_form());
} else { ?><?php if ($comments) { ?>
<?php foreach ($comments as $comment) { ?>
<div class="comment-main" id="comment-<?php comment_ID() ?>">
<div class="gravatar"><?php if (function_exists('gravatar')) { ?><img src="<?php $defaultgravatar = get_bloginfo('stylesheet_directory') . "/i/gravatar-default.gif"; gravatar("PG", 35, "$defaultgravatar"); ?>" alt="Gravatar Icon" /><?php } ?></div>
<div class="comment-meta">
<span class="comment-meta-author"><?php comment_author_link(); ?></span>
<?php comment_date('M jS, Y') ?> at <?php comment_time() ?>
</div>
<div class="comment-body">
<?php comment_text() ?>
</div>
</div>
<?php } // end for each comment ?><?php } else { // this is displayed if there are no comments so far ?>
No comments yet.
<?php } ?><div id="comment-form"><div id="comment-form-inner">
<?php if ('open' == $post->comment_status) { ?>
<h2>Leave a comment</h2><div class="comment-form-info">
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:<?php echo allowed_tags(); ?>
</div><form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="comments-form">
<label for="author">Name</label>
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($_SERVER["REQUEST_URI"]); ?>" /><label for="email">E-mail</label>
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" /><label for="url">URL</label>
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" /><label for="comment">Your Comment</label>
<textarea name="comment" id="comment" cols="40" rows="4" tabindex="4"></textarea><input name="submit" id="comment-submit" type="submit" tabindex="5" value="Submit" />
<?php do_action('comment_form', $post->ID); ?>
</form><?php } else { // comments are closed ?>
Sorry, the comment form is closed at this time.
<?php }
} // end password check
?><div id="comments-info">
/wp-commentsrss2.php?p=<?php echo $post->ID; ?>">RSS feed for comments on this post.
<?php if ('open' == $post->ping_status) { ?>
The URL to TrackBack this entry is:
<?php trackback_url() ?>
</div></div></div>
<?php // if you delete this the sky will fall on your head
}
?><!-- // this is just the end of the motor - don't touch that line either ?? -->
<?php //} ?></div>
</body>
</html>
- The topic ‘Comment popup not displaying comment author info’ is closed to new replies.