Adding conditional stuff to author.php

This commit is contained in:
koenemann 2016-07-04 09:33:27 +02:00
parent e1b63123eb
commit 8237bccf4d
1 changed files with 10 additions and 3 deletions

View File

@ -26,13 +26,20 @@ get_header(); ?>
<h1><?php esc_html_e( 'About:', 'understrap' ); ?> <?php echo $curauth->nickname; ?></h1>
<?php if ( ! empty( $curauth->ID ) ) : ?>
<?php echo get_avatar($curauth->ID); ?>
<?php endif; ?>
<dl>
<?php if ( ! empty( $curauth->user_url ) ) : ?>
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
<dd><a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></dd>
<?php endif; ?>
<?php if ( ! empty( $curauth->user_description ) ) : ?>
<dt><?php esc_html_e( 'Profile', 'understrap' ); ?></dt>
<dd><?php echo $curauth->user_description; ?></dd>
<?php endif; ?>
</dl>
<h2><?php esc_html_e( 'Posts by', 'understrap' ); ?> <?php echo $curauth->nickname; ?>:</h2>