Support » Requests and Feedback » Suggestions for default menus in index.php

  • The defaults “other” links in index.php are today “login” and “register”. First I would suggest to add a “post” link, and second to change the “login” to “logout” when the user is already logged in. The other section would then be something like:


    <li id="other"><?php _e('Other:'); ?>
    <ul>
    <li><a href="<?php echo get_settings('siteurl'); ?>/wp-admin/post.php"><?php _e('Post'); ?>
    <?php get_currentuserinfo(); if ($user_ID != "") { ?>
    <li><a href="<?php echo get_settings('siteurl'); ?>/wp-login.php?action=logout"><?php _e('Logout'); echo " (".stripslashes($user_nickname).")" ?></a></li>
    <?php } else { ?>
    <li><a href="<?php echo get_settings('siteurl'); ?>/wp-login.php"><?php _e('Login'); ?></a></li>
    <?php } ?>
    <li><a href="<?php echo get_settings('siteurl'); ?>/wp-register.php"><?php _e('Register'); ?></a></li>
    </ul>
    </li>

    Cheers

Viewing 1 replies (of 1 total)
  • WordPress 1.5 ships with
    <li><?php wp_loginout(); ?></li>
    in both the classic and default sidebar.php

    That tag should do what you’re looking for regarding the login/logout behavior.

Viewing 1 replies (of 1 total)
  • The topic ‘Suggestions for default menus in index.php’ is closed to new replies.