WordPress.org

Ready to get started?Download WordPress

Forums

Author Image
only show author photo when logued in (2 posts)

  1. lulupont
    Member
    Posted 2 years ago #

    hi, i just intaled and placed the <?php the_author_image(); ?> comand in the header of my site http://sport24.is/
    next to it is the metadata from another plugin.

    the problem is that when the user signs out, the image metadata no longer sows inthe header, but the photo does!!!!!

    i nedd the photo to dispear when the user is not active.
    any ideas????

    the code in the header looks like this:

    <?php session_start(); ?>

    <div id="user-data">
    <?php echo "<b>" . $_SESSION['nombre'] . "</b>"; ?>
    <?php echo $_SESSION['email']; ?>
    <?php echo $_SESSION['telefono']; ?>
    </div>

    <div id="user-photo">
    <?php the_author_image(); ?>

    </div>

    thanks a lot :)

    http://wordpress.org/extend/plugins/sem-author-image/

  2. h0tw1r3
    Member
    Posted 2 years ago #

    <?php session_start(); ?>
    
    <?php if ( isset( $_SESSION['nombre'] ) ): ?>
    <div id="user-data">
    <?php echo "<b>" . $_SESSION['nombre'] . "</b>"; ?>
    <?php echo $_SESSION['email']; ?>
    <?php echo $_SESSION['telefono']; ?>
    </div>
    
    <div id="user-photo">
    <?php the_author_image(); ?>
    
    </div>
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic