Image sizes – functions

add image sizes inside after_theme_setup

Allow featured imagess:

<?php
add_theme_support( 'post-thumbnails' );

setting up additional image sizes (only use if required in the site otherwise creates server bloat)

<?php
add_image_size( 'gomo-hero', 1600, 800, true );
add_image_size( 'gomo-four-by-three', 800, 600, true );
add_image_size( 'gomo-square', 800, 800, true );

In the WordPress admin area under > settings > media, you may want to set medium and large image size to ‘0’ if you are using custom sizes in the functions file.

Search the site


Address

123 Main Street
Town
City
P05T C0D3

Tel: 01234 567 899

Mob: 01234 567 899

Email: ben@gomopress.com


Copyright 2023. Blah blah blah Company Limited