Support » Fixing WordPress » Register and Logout Problems

  • Resolved themaclady

    (@themaclady)



    Using 2.8.5 with “rockinminimal” theme.

    I did not use (nor plan to use) any plugins, widgets, or otherwise unusual stuff. I merely replaced the graphic header and adjusted fonts and other colors so it would integrate with the rest of the website.

    1) I can’t get the Meta to show up even though I have checked “Allow anyone to register”. The only way anyone can register is if they try to comment, it will say you must be logged in. They can click on that, and then get the screen.

    2) When I am in the comments area, I see Edit and Logout links, but logout does not work from there.

    I suppose I can get around the first problem by just adding it to the sidebar (not tried that yet) but there must be some fix for this?

    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • I found this in the register file:

    This file is no longer used in WordPress and is
     * deprecated.
     * @package WordPress
     * @deprecated Use wp_register() to create a registration link instead
     */
    
    require('./wp-load.php');
    wp_redirect('wp-login.php?action=register');

    So how to add this to the sidebar to make it change from Login and Register to Logout?

    1. If your theme is widget-capable, try adding the Meta widget to your sidebar. otherwise you’ll need to edit your sidebar template file and add <?php wp_register(); ?> where you want the Register link to be displayed.

    http://codex.wordpress.org/Function_Reference/wp_register

    OK the widget thing does not work…. you add one and it wipes out everything else.

    Plus I like everything normal where it is.

    Hey I just fixed the comment logout, you’ll never guess how!

    I took a wild guess, added a ? to the word logout and it works like a charm!

    So it’s just this? <?php wp_register(); ?>

    OK so just put

  • around it and before the final ?

    What is this (“,”)?

    <?php wp_register(”, ”); ?>

OK that works but when logged out it ONLY says REGISTER… shouldn’t it say LOGIN?

And when I ‘fixed’ the logout from the comments, it brings me to the screen but does not really log me out.. Bah!

Why is this so messed up? I did not change a thing.

AHHH that did it… now to fix the comments logout.

Try something like:

<?php if (get_option('comment_registration') && !$user_ID ) : ?>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.

<?php elseif($user_ID ) : ?>You are currently 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(get_permalink()); ?>">Log out</a><?php endif;?>

OK here is the bit of code…

<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>

How do I fix this to make it REALLY logout?

It’s above the comments box, in the comments.php file

OOOh thank you thank you thank you! :-*

I don’t know why this was wrong before, I didn’t touch any code. I do know a little php and I know better than to touch anything.

Seems to be fixed…. log in and have a try!?

http://www.robfalcone.com/fans/

Perfection! Bravissimo! THANK YOU..

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Register and Logout Problems’ is closed to new replies.