Search code examples
wordpressauthor

getting an error in author.php when displaying author meta's


I created my own author.php template. I want to display author's custom meta fields Code samples is in this image : http://prntscr.com/wsdsa

But Wordpress doesnt display anything ? What should i do ?

                <div class="BCol">
                    <?php echo keepAuthorImage(); ?>
                </div>
                <div class="ACol">
                    <div class="A1"><?php echo get_the_author_meta('first_name') ?> <?php echo get_the_author_meta('last_name') ?></div>
                    <div class="A2"><?php echo the_author_meta('job') ?></div>
                    <div class="A3"><?php echo get_the_author_meta('location') ?></div>
                    <div class="A5">
                        <a href="<?php echo get_the_author_meta('userwebpages') ?>" target="_blank"><img src="<?php echo THEME; ?>/_assets/_img/websiteicon.png" alt=""></a>
                        <a href="http://twitter.com/<?php echo get_the_author_meta('twitter') ?>" target="_blank"><img src="<?php echo THEME; ?>/_assets/_img/twitteric.png" alt=""></a>
                        <a href="http://instagram.com/<?php echo get_the_author_meta('instagram') ?>" target="_blank"><img src="<?php echo THEME; ?>/_assets/_img/instagramic.png" alt=""></a>
                    </div>
                    <div class="A4"><?php echo get_the_author_meta('aboute') ?></div>
                </div>

Any helps ? Thanks.


Solution

  • Wordpress have pre defined variables, as

    $cat

    $tag

    etc. you have to use

    $author

    to make your process.