Skip to content

Devi Sri Mari Blog:: Web Technology Trends, News, and Social Media

Menu
  • About Me
  • CONTACT US
  • Sample Page
  • WEB DEVELOPMENT
Menu

How to show the author in a WordPress post?

Posted on January 25, 2014

wordpress-logp
To show the information about the post author, first open the single.php file in your WordPress theme and find the where the content is displayed:

<?php the_content(”); ?>

Then add the following codes in your theme:

<?php if ($lw_post_author == “true” && is_attachment() != TRUE) : ?>

<div >

<?php echo get_avatar( get_the_author_id(), ’28’ ); ?>

<h4>

<?php _e(‘Author’,’lightword’); ?>: <a href=”<?php the_author_url(); ?>”><?php the_author(); ?>

</a>

</h4>

<?php the_author_description(); if(!get_the_author_description()) _e(‘No description.

Please update your profile.’,’lightword’); ?>

</div>

<?php endif; ?>

This will include the information about the post author on your site. Simply update your style.css to change the style that you want.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • “Who needs Superheros when there is a Real hero and she is called as Mother”
  • Improve Your Business Behind Social Media
  • Single-Page Application Benefits and How it Works
  • World Sparrow Day
  • Google’s ‘Mobilegeddon’ Will Affect Search Results
  • How To Use Google’s New Blocked Resources Report
  • Wikipedia Lists Ten Most Edited Pages Of 2014
  • Google Is Shutting Down The Google Earth API
  • Google Maps App Adds Real-Time Weather & Facts
  • Google Maps App Gets Design Revamp
©2025 Devi Sri Mari Blog:: Web Technology Trends, News, and Social Media | Design: Newspaperly WordPress Theme