Knowledgebase

Change Homepage Slider Height – Earth WordPress Theme

By default the slider of the Earth WordPress Theme has a fixed height to avoid a chrome/safari specific bug if the height is left to varied. To edit the height you will have to make 1 change in the php template and 1 css change.

Step 1: PHP Edit

Open includes/home/slides.php and you can change the height value for the image cropping function:

//cropped image
$thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url($thumb,'full'); //get full URL to image
$featured_image = aq_resize( $img_url, 940, 400, true ); //resize & crop the image

Step 2: CSS Edit

Add the following custom css either to your custom css field in the theme panel under the “styling tab” or in your child’s theme style.css file or if you don’t mind in your main style.css file.

Edit the highlighted value to reflect your new slider height.

.home #slider-wrap,
.home #slider .slides_container,
.home #slider div.slides_container img{ height: 200px; }

Changing The Slider On Pages?

If you want the slider height to change on all pages simply open includes/img-slider.php and make the same edits as step 1 then for the css edit simply remove all the “.home” tags so that the css is applied to all pages.