Support » Plugins and Hacks » is user logged in

is user logged in

  • <?php
    if ( is_user_logged_in() ) {
    echo ‘Welcome, registered user!’;
    } else {
    echo ‘Welcome, visitor!’;

    i would like to use the php thing below for logged in users

    $rand_posts = get_posts(‘numberposts=1&orderby=rand’);
    foreach( $rand_posts as $post ) :
    <?php meta(‘textdate’); ?>

    <?php endforeach; ?>

    how can this be done. using the code results in a blank page. doesn’t work.

    thanks! flo

  • The topic ‘is user logged in’ is closed to new replies.
Skip to toolbar