WordPress Polyglots Team Launches New Monthly Newsletter

WordPress’ Polyglots team has published the first edition of a new monthly newsletter aimed at helping contributors stay informed and engaged with the team’s activities.

WordPress has been translated by volunteers for more than 15 years since version 1.2, with the earliest contributions from the Hindi, French, Japanese, and Norwegian communities. Since that time the Polyglots team has grown to include the work of 55,427 translation contributors. They have also adopted more efficient tools like P2 and Slack to stay connected, but some translators find it difficult to follow the constant stream of posts and meetings.

The monthly newsletter was launched to provide a short-format digest of all the significant happenings and discussions in the translation community. It will include news related to upcoming releases and Polyglots tools, condensed so contributors don’t have to keep a close eye on the team’s P2 blog, Slack channels, or RSS feed.

The first edition features a brief summary of the month-long WordPress Translation Day 2021 event, which brought in 697 new translation contributors. Altogether the contributor teams submitted 518,710 approved translation strings during 22 local and six livestream events.

The majority of people using WordPress are using it with a translation. As of October 2021, 55.36% of WordPress sites are running a translated site. That figure is slowly inching upward as WordPress adoption grows in the non-English speaking world.

Even if you’re not a member of the Polyglots team, this newsletter is a good way to stay up-to-date with the exciting frontier of WordPress translations. Subscribers can sign up to receive monthly Polyglots updates directly via email.

How to show 2nd drop-down field after first drop-down selection is chosen?

Im trying to modify a web script where a drop-down works successfully. How can another drop-down field appear only after a selection has been made from the first drop-down list? Heres the current code:

<?php if ($pt->page == 'category' && $pt->show_sub == true) { ?>
<div class="pull-right col-md-3 no-padding-left">
<select name="type" class="form-control form-group" id="sub_categories_">
<?php echo $pt->sub_categories_array["'".$_GET['id']."'"]; ?>
</select>
<div class="pull-right col-md-2 col-sm-2 text-right"><h5>{{LANG sub_category}}</h5></div>

and this:

$(document).on('change', '#category_id', function(event) {   
event.preventDefault();   
id = $(this).val();   
$('#sub_category_id').html(sub_categories_array["'"+id+"'"]);
});
$(document).on('change','#sub_categories_', function(event) {   
window.location.href = site_url+'/videos/category/<?php echo($_GET['id']) ?>/'+$('#sub_categories_').val();
});

any guidance is appreciated

Block Pattern Modal Explorer Coming to WordPress 5.9

It has been a long year since Paal Joachim Romdahl’s proposed an alternative block pattern experience. In November 2020, he opened a ticket on the Gutenberg GitHub repository to explore an overlay-based approach to viewing, searching, and inserting patterns into the content canvas. Late last week, a pull request for the long-awaited feature landed in the Gutenberg plugin.

A year ago, patterns were a new concept for the average WordPress user. WordPress 5.5 introduced them to the world, and we were only a month out from the next major release. I had hoped we could plug the new overlay in as soon as possible, but sometimes an idea needs time or the right people working on it to give it that necessary push.

The first iteration of the pattern explorer will likely be a baseline experience that can be built upon in the future. Currently, users can search via the modal or filter by category (includes featured patterns in the list).

Block pattern explorer as viewed from a popup overlay.  It features a left sidebar of categories and a right section with two columns of various block patterns.
Pattern explorer modal.

In the long term, the explorer should offer more features. An earlier mockup of it showed user favorites by connecting with a WordPress.org account. This sat alongside featured and newest-pattern lists. The mockup also had a separate section for template part patterns, such as header, footer, and sidebar. With the WordPress 5.9 feature freeze coming on November 9, those extras will likely need to wait until a future release.

To access the explorer overlay, users will need to click the “Explore” button when viewing patterns in the inserter. It then pops up a full-screen overlay for navigating them.

Highlighting an "Explore" button in the block inserter for WordPress.  It sets next to a select dropdown field.
“Explore” button next to the pattern category dropdown.

This type of pattern navigation experience has already become a necessity. The narrow inserter has not held up well against themes that ship a lot of patterns, such as the 40+ bundled with Tove. The problem will only grow exponentially worse as the pattern directory is opened to more submissions and other themes inevitably add dozens upon dozens of their own.

The experience is much nicer now. However, it still has a few wrinkles that need to be ironed out. Several patterns have scrollbars of their own within the explorer. As Anne McCarthy noted in the ticket, it makes the “experience very janky.”

Block pattern explorer modal.  In the right section, two of the patterns have scrollbars in their previews.
Patterns with scrollbars.

In my tests, the patterns butted against the explorer sidebar on the left. Fixing this should not take much work.

More than once, I also ran into the dreaded “Aw, Snap!” browser error message after viewing the explorer’s patterns. The error code: out of memory. This happened when running a clean install alongside the Twenty Twenty-Two WordPress theme. I can only hope it is a non-issue when WordPress 5.9 rolls around and is live on production sites.

Eventually, I want to see a quicker method for accessing this pattern modal. I am leaning toward a dedicated button in the toolbar for pulling up the overlay. Right now, it takes three mouse clicks to open it. First, users must click the “+” inserter button. Then, they must switch to the Patterns tab before hitting the Explore button. That is a lot of work for something that should be a first-class feature.

A keyboard shortcut would also be a welcome access point. I could live with that compromise if the development team is not yet ready to stick another item at the top level of the UI.

Overall, I am happy with this upcoming feature. I may even try my hand at building some new ones. Those I had been tinkering with in my custom theme had become so unwieldy that testing them was a headache. This will open things up and should make it a lot more enjoyable to use.

Gutenberg plugin users should see this land in version 11.9 later this week. It is also currently available in the trunk branch of WordPress.

CSS Grid Can Do Auto Height Transitions

Bonafide CSS trick alert! Nelson Menezes figured out a new way (that only works in Firefox for now) that is awfully clever.

Perhaps you know that CSS cannot animate to auto dimensions, which is super unfortunate. Animating from zero to “whatever is necessary” would be very helpful very often. We’ve documented the available techniques. They boil down to:

  • Animate the max-height to some more than you need value, which makes timing easing imprecise and janky.
  • Use JavaScript to measure the final size and animate to that, which means… using JavaScript.

Nelson’s technique is neither of those, nor some transform-based way with visual awkwardness. This technique uses CSS Grid at its core…

.expander {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 1s;
}

.expander.expanded {
  grid-template-rows: 1fr;
}

Unbelievably, in Firefox, that transitions content inside that area between 0 and the natural height of the content. There is only a little more to it, like hiding overflow and visibility to make it look right while maintaining accessibility:

That’s wonderful. Let’s get some stars on this issue and maybe Chrome will pick it up. But of course, even better would be if auto height transitions just started working. I can’t imagine that’s totally outside the realm of possibility.


The post CSS Grid Can Do Auto Height Transitions appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Inspirational Websites Roundup #31

Another month has passed and we’ve got a fresh websites roundup for you! There’s lots of amazing web designs with interesting layouts, typography and color schemes. Interesting, playful details and white space are big, and mellow light in images create the right ambient for web experiences that are a pleasure to browse.

Hope you enjoy this set and find it inspirational!

Caledonian

Palette

Cleo

MESA Hurstville

kirifuda

Creative Nights

Oatly

ETQ Amsterdam

Star Atlas

Canvas Agency

Atoll Digital

CROING

L+L®

Eun Jeong Yoo

Niftypays

IAD LAB 2021

Miranda

Hyper Tria

INO

Ferro 13

15 years of MELON FASHION

Liron Moran Interiors

The Sea We Breathe

hyogen

Feldman.Studio

Team Stefansky

Shapefarm

DFY

GSoft

Goodkids

Victoire Douy

part-time.studio

The Andrei Sakharov Museum

Lunchbox

The post Inspirational Websites Roundup #31 appeared first on Codrops.

3 Tips for Making Your Own DIY Planner for 2023

We’ve reached that time of the year when you can’t enter a stationery store without stumbling upon countless amazing new planners. You’ll be tempted to buy one right away, but making your own is actually a match better option, and here’s how you can make it more personal. Right Notebook In addition to being much […]

How to Create Additional Image Sizes in WordPress

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?

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.