I just switched from the default theme. On my new theme, I’m not automatically signed in and have to keep filling all the fields out. Annoying. I found this post but it didn’t really help me figure it out.
I looked through comment.php on the default theme and think i’m getting close with this code:
<?php if ( get_option('comment_registration') && !$user_ID ) : ?> <p>You must be <a>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> 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>Logged in as <a>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p>
<?php else : ?>
can someone show me the right code and also tell me where to put it in my new comment.php?
- The topic ‘Pre-filled comment form (keeping users signed in)’ is closed to new replies.