WordPress.org

Support

Support » How-To and Troubleshooting » Customisation of login/logout/posting

Customisation of login/logout/posting

  • heya,

    love the application. What im trying to do is customise login/registration and logout.

    Basically look at my menu top right at http://www.theprogrammersforum.com

    theres :

    * Login
    * Post/Edit Article
    * Register
    * Logout

    ive already done it so that when you login you are brought to the site, and not straight into admin.

    logout goes to the wp-login.php – what i need there is the code to clear the cookies and then return to the main page (index.php).

    also when the user is logged in – login and register links not to display., and when they are Not logged in the Post/Edit Article is not displayed.

    its ironic that my site is about programming 🙂 but im an asp programmer lolol. ah well i can but try lol

Viewing 3 replies - 1 through 3 (of 3 total)
  • ok i figured out the logout with no problem, but im struggling with checking whether they are logged in/out in the index file – so i can show/hide particular menu choices. Any clues? 🙂

    anyone able to help with this? i know i have to check if the cookies are on the users machine, but its the code im struggling with (to be put in the index file)

    ok guys i worked it out. If anyone wants a menu like mine then here it is. Edit the main file Index.php and change your menu to :

    <?php get_currentuserinfo(); ?>

    <ul>
    <li id="other">

    <ul>
    <li><a>/index.php"><?php _e('Home'); ?></a></li>
    <?php<br />
    if ( $user_nickname== "" ) {<br />
    ?>

    <li><a>/wp-login.php"><?php _e('Login'); ?></a></li>
    <li><a>/wp-register.php"><?php _e('Register'); ?></a></li>
    <?php<br />
    }<br />
    if ( $user_nickname<> "" ) {<br />
    ?>

    <li><a>/wp-login.php"><?php _e('Post/Edit Article'); ?></a></li>
    <li><a>/wp-login.php?action=logout"><?php _e('Logout'); ?></a></li>
    <?php<br />
    }<br />
    ?>
    </ul>
    </li>
    Hope you like it. Took me long enough. I guess it was about time i learned some php 🙂

    hm ok i cant post this properly. if anyone wants the code then please mail me at philliph@theprogrammersforum.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customisation of login/logout/posting’ is closed to new replies.
Skip to toolbar