How to Create Additional Image Sizes in WordPress

Featured Imgs 13

Do you want to create additional image sizes in WordPress?

By default, WordPress automatically creates several copies of image uploads in different sizes. Additionally, WordPress themes and plugins can also create their own image sizes.

In this article, we’ll show you how to easily create additional image sizes in WordPress and use them on your website.

Creating additional image sizes in WordPress

Why Create Additional Image Sizes in WordPress?

Normally, all popular WordPress themes and plugins handle image sizes very well. For instance, your WordPress theme may create additional sizes to use as thumbnails on archive pages.

However, sometimes these image sizes may not fit your own requirements. You may want to use a different image size in a child theme or a post grid layout.

You can do this by creating additional image sizes in WordPress and then calling these sizes whenever you need them.

That being said, let’s take a look at how to create additional image sizes in WordPress.

Registering Additional Image Sizes for your Theme

Most WordPress themes including all the top WordPress themes support post thumbnails (featured image) feature by default.

However, if you are creating a custom WordPress theme then you will need to add support for post thumbnails by adding the following code to your theme’s functions.php file.

add_theme_support( 'post-thumbnails' );

Once you enable the support for post thumbnails, you can now use the functionality of registering additional image sizes by using the function add_image_size().

The add_image_size function is used in the following format:

add_image_size( 'name-of-size', width, height, crop mode );

Example code can look like the following:

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

Now if you notice, we have specified three different sorts of image sizes. Each has different modes such as hard crop, soft crop, and unlimited height.

Let’s cover each example and how you can use them in your own projects.

1. Hard Crop Mode

As you may notice, there is a “true” value added after the height. This tells WordPress to crop the image exactly to the size that we have defined (in this case 120 x 120px).

This method is used to ensure that everything is exactly proportionate. This function will automatically crop the image either from the sides or from the top and bottom depending on the size.

Hard crop images example

2. Soft Crop Mode

By default, soft cropping mode is turned on this is why you do not see any additional value added after the height. This method resizes the image proportionally without distorting it. So you might not get the dimensions that you wanted. Usually, it matches the width dimension and the heights are different based on each image’s proportion. An example display would look like this:

Soft crop example

Unlimited Height Mode

There are times when you have super long images that you want to use in your design, but you want to make sure that the width is limited. For instance, infographic images tend to be very long and usually wider than the content width.

This mode allows you to specify a width that will not break your design while leaving the height to be unlimited.

Unlimited height mode

Displaying additional image sizes in your WordPress theme

Now that you have added the functionality for the desired image sizes lets take a look at displaying them in your WordPress theme. Open the theme file where you want to display the image and paste the following code:

<?php the_post_thumbnail( 'your-specified-image-size' ); ?>

Note: This bit of code must be pasted inside the post loop.

That’s all you really have to do to display the additional image sizes in your WordPress theme. You probably should wrap it around with the styling that fits your need.

Regenerating Additional Image Sizes

If you are not doing this on a brand new site, then you probably will have to regenerate thumbnails.

The add_image_size() function only generates the sizes from the point it was added into the theme. This means any post images that were added prior to the inclusion of this function will not have new sizes.

To fix this, you need to regenerate the new image size for older images. This is made easy by the plugin called Regenerate Thumbnails. Once you install and activate the plugin, a new option is added under the menu: Tools » Regenerate Thumbnails

Regenerate thumbnails

You’ll see the option to regenerate thumbnail for all images or just the featured images. We recommend regenerating all images to avoid any unexpected behavior or broken images.

For more details, see our article on how to easily regenerate new image sizes in WordPress.

Enabling Additional Image Sizes for your Post Content

Even though you have enabled image sizes in your theme, the usage is limited only to your theme which does not make any sense.

All image sizes are being generated regardless, so why not make it available for the post author to use within the post content.

You can do this by adding the following code to your theme’s functions file.

function wpb_custom_image_sizes( $size_names ) {
    $new_sizes = array(
        'homepage-thumb' => 'Homepage Thumbmail', 
        'singlepost-thumb' => 'Infographic Single Post'
    );
    return array_merge( $size_names, $new_sizes );
}
add_filter( 'image_size_names_choose', 'wpb_custom_image_sizes' );

Don’t forget to save your changes after adding the code.

You can now go and upload an image to a WordPress post or page. In the image block settings you’ll see your custom image sizes under the ‘Image size’ option.

Choose your custom image size inside post editor

You and other authors working on your website can now select these size options when adding images to posts and pages.

We hope this article helped you learn how to create additional image sizes in WordPress. You may also want to see our article on the best image compression plugins for WordPress and our WordPress performance guide to improve your website speed.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Create Additional Image Sizes in WordPress appeared first on WPBeginner.

What’s the Difference Between Landing page vs Website?

Featured Imgs 19

Do you want to learn the difference between landing page vs website?

Many small businesses wonder whether they should make a landing page or a full-fledged website to showcase their online presence.

In this article, we’ll show you the difference between landing page vs website and which one you should make for your business.

Landing page vs website - what is the difference

What is a Landing Page?

A landing page is a stand-alone web page designed for a specific purpose and goal. It is a highly versatile tool that can be used in marketing, advertising, and lead generation campaigns.

It can also be used as a coming soon website for a business, a single-page website on its own, a product sales page, and more.

Landing page example

Landing pages are specifically designed for higher conversions. They have unique design characteristics that make it easier for users to perform the desired action.

This action could be signing up for an email list, purchasing a product, filling out a form, and more. These actions are referred to as ‘Call to action’.

Overall, the goal of landing pages is to minimize distractions that could take users away, and provide them with all the information they need to take action.

A landing page could also be a stand-alone website on its own with different sections all leading to one clear call to action.

A landing page website

What is a Website?

A website is a collection of different landing pages and sections to help your users find what they’re looking for.

For instance, a typical business website can have an about section, a separate blog page, a contact us page, products and services pages, and more.

There are many different types of websites and they can all have different pages for different features.

How a Website Differs from a Landing Page?

Unlike a landing page, a website can have multiple pages of information with different goals and purposes.

Not each page on a website is as highly focused on conversions as a landing page.

For instance, a business website may want users to get information about all the products and services they are offering. It may also give users multiple calls to action to choose from (e.g. make a purchase, ask for quote, join email list, follow on social media, and more).

Different types of websites would have different goals and a website gives them more ways to engage the audience.

A website could also be supported by multiple landing pages for their marketing campaigns.

For instance, a membership website may utilize a landing page for a subscription plan or an eCommerce store may want to create a pre-launch landing page for an upcoming product.

Landing page vs Website – Which One to Choose?

Many beginners struggle to decide between landing page vs website and which one to choose?

The answer lies in your own requirements and what you want to achieve for your business.

If you want to quickly launch a product, create an online presence for your business, capture potential leads and customers, then a landing page would be an easy way to go.

Example of a quick landing page

On the other hand, if you want to create a multi-page online presence for your business, use an eCommerce cart, sell online courses, start a blog, and more, then you will be better off with a website.

WPForms Website example

Remember you can always choose to create a landing page as a single-page website. You can also convert your landing page to a full-fledged website as your business grows.

Similarly, you can also create a complete website with multiple pages and still add landing pages for specific campaigns.

What Do I Need to Make a Landing Page vs Website?

You’ll need a domain and a web hosting account to create a landing page or a website.

A domain name is the location of your website or landing page (e.g. wpbeginner.com). This is what your users will type in their browsers to view your landing page or website.

The web hosting account is where your landing page or website files will be stored.

Normally, a domain costs around $16 per year, and hosting plans start at $7.88 per month (usually paid annually). Now this is a significant amount if you are just starting out.

Luckily, our friends at Bluehost has agreed to offer a free domain name and a generous discount on hosting for WPBeginner users.

Basically, you can get started for just $2.75 per month.

→ Click Here to Claim This Exclusive Bluehost Offer ←

Bluehost is one of the biggest hosting companies in the world and an officially recommended WordPress hosting provider.

Once you have signed up for a hosting account, Bluehost will automatically install WordPress for you.

WordPres is the world’s best website builder and makes it super easy to create a website or make landing pages. Simply log in to your hosting account and then login to your WordPress account dashboard.

Log in to WordPress

How to Make a Landing Page for My Business

The easiest way to make a landing page is by using SeedProd. It is the best landing page builder on the market and allows you to easily create landing pages using a drag and drop interface and without writing any code.

First, you need to install and activate the SeedProd plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Note: There is also a free version of SeedProd available that you can use to give it a try. However, you’ll need to upgrade to unlock all features and templates available in the premium version.

Upon activation, you need to enter your SeedProd license key. You can find this information under your account on the SeedProd website.

SeedProd license key

You can now start building your first landing page.

Simply head over to SeedProd » Pages page and click on the ‘Create new landing page’ button.

Creating a new landing page

Next, you will be asked to choose a template page as a starting point for your landing page. SeedProd comes with dozens of beautiful templates that you can completely modify or you can even start with a blank template.

Choose a landing page template

This will bring up a popup asking you to provide a name for your landing page. Enter a name for your page and then click on the ‘Save and Start Editing the Page’ button.

Name your landing page

SeedProd will now load the page builder interface with a live preview of your chosen template.

SeedProd page builder interface

You can simply point and click on any item in the live preview to edit it. You can also add new blocks from the left column to your page.

SeedProd comes with all commonly used elements as blocks. Each block has its own settings that you can adjust using a simple user interface.

It also includes blocks for WooCommerce and integrations for all popular email marketing services under the ‘Connect’ tab.

Integrations

Once you are satisfied with your landing page, you can click to save or publish your page to make it live.

Publish landing page

Publishing Landing Page as Homepage for Your Domain

Now if you want to only display your landing page when someone enters your domain name, then you’ll need to set it up as your homepage in WordPress.

Simply go to Settings » Reading page. From here you need to select ‘A static page’ under ‘Your homepage displays’ option.

Set homepage

After that, go ahead and select the landing page you created earlier as your ‘Homepage’. Don’t forget to click on the Save changes button to update your settings.

Creating Landing Pages for Other Domain Names?

What if you wanted to create landing pages for other domain names? This comes in handy if you have multiple domains to cover different markets and regions.

SeedProd comes with built-in domain mapping support. This allows you to easily create a landing page in SeedProd and map it to any other domain name.

Set custom domain name

For more details, see our tutorial on how to easily add a custom domain for your landing page in WordPress.

How to Make a Complete Website for My Business

WordPress is the most powerful website builder used by millions of business websites, eCommerce stores, blogs, news and media sites.

Since you have already installed WordPress on your Bluehost account, you can simply login to your account dashboard and start working on your website.

First, you want to add new pages by visiting Pages » All Pages page and clicking on the Add New button.

Adding new pages in WordPress

WordPress comes with a powerful editor that allows you to easily add design and content elements to your pages as blocks. To learn more, see our tutorial on how to use WordPress editor.

Tip: Need ideas for pages? See our list of the most important pages to create for a new WordPress website for some excellent ideas.

Next, you would want to choose a design for your website. WordPress comes with thousands of free and paid themes for all sorts of websites.

Bonus Tip: Need help choosing a theme, see our expert pick of the most popular WordPress themes or take a look at these great themes for business websites.

Once you have found a theme you want to use, you can go to Appearance » Themes page and click on the Add New button to install it.

Install WordPress theme

See our tutorial on how to install a WordPress theme for detailed instructions.

The real power of WordPress comes from its plugins. These are like apps for your WordPress websites that you can install to extend its features. Start by checking out our pick of the essential WordPress plugins.

Need more help with your new website? See our detailed tutorial on how to make a website with step by step instructions.

We hope this article helped you learn the difference between landing page vs website. You may also want to see our guide on how to promote your business on a budget and our tips on quickly getting more traffic to your website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post What’s the Difference Between Landing page vs Website? appeared first on WPBeginner.