Theme Comments Help
-
So I retired my blog back in 2016 for work reasons. Now it is 2022 and I’ve brought my blog back online. I’m having some minor issues with the comment displays.
In 2016 it would show only the comment box if you happened to be logged in and if you had no account or not logged in it would show text boxes for Author, Email, and Website.
Now in 2022 it doesn’t seem to know I’m logged in any more and shows the three text boxes.
I know nothing of php other than the basics. My “theme” is one I somehow threw together using another theme as a template.
This is the portion of code that I need help fixing:
<?php if ('open' == $post->comment_status) : ?> <div class="center-widget-title" id="respond"><?php _e('Leave a Reply'); ?></div> <div class="center-widget"> <?php if ( get_option('comment_registration') && !$user_ID ) : ?> <p><a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>"><?php _e('logged in'); ?></a> <?php _e('to post a comment'); ?>.</p> <?php else : ?> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <?php if ( $user_ID ) : ?> <p><?php _e('Logged in as'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url() ?>" title="Log out of this account">Logout »</a></p> <?php else : ?> <p> <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /> <label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label> </p> <p> <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /> <label for="email"> <small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small> </label> </p> <p> <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /> <label for="url"><small>Website</small></label> </p> <?php endif; ?> <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p> <p> <?php if (function_exists('ajax_comment_preview')) ajax_comment_preview('previewbutton'); ?> <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e("Submit Comment"); ?>" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> </p> <div class="entry"><?php if (function_exists('ajax_comment_preview')) ajax_comment_preview('previewarea'); ?></div> <?php do_action('comment_form', $post->ID); ?> </form> <?php if (function_exists('show_manual_subscription_form')) show_manual_subscription_form(); ?> <?php endif; ?> </div> <!-- center-widget --> <?php else : // comments are closed ?> <!-- If comments are closed. --> <div class="center-widget-title"><?php _e('Leave a Reply'); ?></div> <div class="center-widget"> <p class="nocomments"><?php _e('Comments are closed.'); ?><p> </div> <!-- center-widget --> <?php endif; ?>
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Theme Comments Help’ is closed to new replies.