AI Verified

Name

Custom WordPress Image Sizes

About

A snippet for custom WordPress image sizes

Language

PHP

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

add_image_size( 'sidebar-thumb', 120, 120, true ); // Hard Crop Mode add_image_size( 'homepage-thumb', 220, 180 ); // Soft Crop Mode add_image_size( 'singlepost-thumb', 590, 9999 ); // Unlimited Height Mode

Codevault

one2love

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: Not Specified

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

19/12/2022

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Custom WordPress Image Sizes

 
                    
1add_image_size( 'sidebar-thumb', 120, 120, true ); // Hard Crop Mode
2add_image_size( 'homepage-thumb', 220, 180 ); // Soft Crop Mode
3add_image_size( 'singlepost-thumb', 590, 9999 ); // Unlimited Height Mode

0

Related Snippets

Please see some snippets below related to this snippet..

General

Unverified

0

QuizLogic

Added: 4 months ago

Last Updated: 4 months ago

General

AI Verified

0

Better Breadcrumbs

Added: 9 months ago

Last Updated: 9 months ago

Two main customizations are made:1. Changing the label of the 'home' breadcrumb based on the current page.2. Modifying the URL linked to the 'home' breadcrumb depending on the page.

General

AI Verified

0

Allow smilies

Added: 9 months ago

Last Updated: 9 months ago

Allows smiley conversion in obscure places. This is a sample snippet. Feel free to use it, edit it, or remove it.

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

General

AI Verified

0

Custom WordPress Image Sizes

Added: 2 years ago

Last Updated: 1 year ago

A snippet for custom WordPress image sizes