Functions used on Blog post (home.php) pages

Post title

<?php the_title(); ?>

Post content

<?php the_content(); ?>

Post excerpt

<?php the_exerpt(); ?>

Post Category

<?php the_category(', '); ?>

The (‘,’) parameter defines that if multiple categories are present it will be separated by a comma (‘,’) .

Author avatar

<?php echo get_avatar(get_the_author_meta('ID'),24); ?>

’24’ is the size of the avatar in pixels that is to display.

Author name and link:

<?php the_author_posts_link(); ?>

Check if post thumbnail exists

<?php if(has_post_thumbnail()){ } ?>

Display featured post thumbnails

<?php the_post_thumbnail('medium'); ?>

Display Date vs Display time

<?php the_time('F j, Y'); //the_date(); ?>

Th following will display the date only for the first post of the day.

<?php the_date(); ?>

latest projects