O'Reilly logo

Bootstrap 4 Site Blueprints by Ian Whitley, David Cochran, Bass Jobsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling your blog posts

First add an image to the hello world blog post. Edit the blog post in the WordPress Dashboard and add a Featured Image, as shown in the following screenshot:

Styling your blog posts

Note

Make sure that your WordPress installation has a writable wp-content/uploads directory to store the uploaded media. Also see https://codex.wordpress.org/Changing_File_Permissions for more information about file permissions.

Now edit the loop-archive.php file so that the HTML and PHP code looks like that shown here:

<article id="post-<?php the_ID(); ?>" <?php post_class(''); ?> role="article"> 
<?php the_post_thumbnail('full'); ?>

<div class="blog-post"> <header class="article-header"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required