I am making template for archives in WordPress website, but my template will not work for author name on author archive.
I have this:
<?php if (is_category('')) { ?>
<?php single_cat_title(); ?>
<?php } elseif (is_author('')) { ?>
<?php get_userdata( get_query_var('author') );?>
<?php } elseif (is_day('')) { ?>
<?php echo get_the_time('F j, Y'); ?>
<?php } elseif (is_month('')) { ?>
<?php echo get_the_time('F Y'); ?>
<?php } elseif (is_year('')) { ?>
<?php echo get_the_time('Y'); ?>
<?php } elseif (is_tag('')) { ?>
<?php echo single_tag_title(''); ?>
<?php } ?>
This part will not work:
<?php } elseif (is_author('')) { ?>
<?php get_userdata( get_query_var('author') );?>