A Little Code Will Do the Trick

I built this WordPress blog using the Blocksy theme. I picked Blocksy because it’s fast, lightweight, free, and works with the Gutenberg editor. But. like all themes, it does have it’s limitations. In this case, I needed to change the size and position of the ‘featured image’ area of the ‘single post’ page. For that, I needed to add ome code to the theme.

Fortunately, it’s really not that hard. WordPress has a tool called ‘Additional CSS‘. And it does exactly what you think. It allows you to add CSS code to any page to change the page layout. The tricky part, is figuring out which part of the theme needs to be edited. That’s where the browser’s Developer Tools come in.

This is the code I added to make the changes I needed

/** single post css **/
.ct-featured-image .ct-media-container{
  height: 400px;
  width: 400px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

Avatar photo
oneofone
Articles: 26

Leave a Reply

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