Knowledgebase

Make Homepage Blog Posts Full Width – Earth WordPress theme

If you don’t want to show events on the homepage of the Earth theme you can easily customize the theme to remove the events and then show the blog posts full-width.

Step 1 – Remove The Events

If you open template-home.php you can remove line 27 to remove the events:

get_template_part( 'includes/home/events');

Alternatively you can simply delete the file located at includes/home/events.php

Step 2 – Make Blog Posts Full-Width

The following CSS will make the blog posts full-width. Simply paste this code at the bottom of your main style.css file, your child theme’s style.css file or the custom CSS field in the theme panel.

.home #recent-news{ width: 100%; }
.home .recent-entry-content{ width: 750px; }

Step 3 – Increase Blog Posts Excerpt Length

Now that you have more room for the blog entries you might want to increase their excerpt length. To do so, simply open includes/home/blog.php and edit line 64:

  <?php echo wp_trim_words( get_the_content(), 11, '...' ); ?>

Change where it says “11″ to the amount of characters you wish to show.