Home » WordPress Tutorials » Basics » How to Set Full-Width Alignment in WordPress Gutenberg Block

How to Set Full-Width Alignment in WordPress Gutenberg Block

WordPress Gutenberg block editor introduces a width alignment option that allows you to become more creative with your site layout.

With width alignment, you can use various width settings for your Gutenberg blocks, so they become wider than the main content area and even as wide as your computer screen.

In the following paragraphs, you will read how to enable block width alignment and how to use it across your pages and posts.

 

How to Enable Full-Width Alignment in WordPress

The full-width alignment is a feature that comes with the choice of a WordPress theme. However, not all themes support it.

Fortunately, you can quickly enable the option, regardless of whether the theme you are using supports width alignment or not.

To activate the feature, you should first enter your WordPress admin dashboard.

Once in, head to Appearance->Theme File Editor:

WordPress Gutenberg BLock Editor Full-Width Alignment

 

Once within the Theme File Editor, WordPress should display a page such as this one:

WordPress Gutenberg BLock Editor Full-Width Alignment Theme Editor

 

Don’t get intimidated by the amount of code you see. You only need to paste a short snippet within the functions.php file.

To open the functions.php file, while within the Theme Editor, click on the functions.php button on the right of the screen:

WordPress Gutenberg BLock Editor Full-Width Alignment Functions FIle

 

Once you do, a new page with code snippets should appear. This is the function.php file with all the code information it contains:

WordPress Gutenberg BLock Editor Full-Width Alignment Functions code line

 

Now, add this snippet to the file:

add_theme_support (‘align-wide’)

WordPress Gutenberg BLock Editor Full-Width Alignment add code snippet

 

Once you add the snippet, click on the blue Update File button at the bottom of the page, so WordPress applies and saves the changes you just made:

WordPress Gutenberg BLock Editor Full-Width Alignment save changes

 

Now, you can use the Full-Width Alignment feature with Gutenberg.

 

How to Set Full-Width Alignment in WordPress Gutenberg Block

Now that the full-width alignment is enabled, you can try out how it works and come up with various design ideas for your WordPress website.

To do so, open a page or a blog post you wish to edit, or simply create a new blog post or a new web page.

For this demonstration, we will edit a blog post.

To be able to use the width align feature, open the Gutenberg editor, and insert a new block in the content area.

We will insert a sample paragraph block and an image block:

WordPress Gutenberg BLock Editor Full-Width Alignment Image Block

 

Now, click on the block and locate the Align settings:

WordPress Gutenberg BLock Editor Full-Width Alignment Button

 

Now, click the Align button and have a look at the various options:

WordPress Gutenberg BLock Editor Full-Width Alignment menu

 

To align the Gutenberg block to full width, simply click on this option from the menu:

WordPress Gutenberg BLock Editor Full-Width Alignment button

 

Once you click on the Full width, WordPress will automatically expand the image beyond the content area and to the corners of your screen:

WordPress Gutenberg BLock Editor Full-Width Alignment Image

 

Now you can use the full-width alignment feature on your WordPress posts and web pages.

 

Conclusion

The Full Width Alignment option in WordPress is very handy, as it gives you new ways to design the layout of your pages and posts.

Now you know how to activate and use the feature.

Related:

Was this article useful?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Newest Articles:

How to Add a Site Logo Block in WordPress with Gutenberg

Adding a site logo in WordPress with Gutenberg is straightforward and requires only a few mouse clicks and just several minutes of your time. In the following paragraphs, you will read how to add a site logo to your WordPress website via the Gutenberg editor step by...

How to Add Images to WordPress with Gutenberg

Adding images with Gutenberg is quite simple. The block editor is very user-friendly and allows you to add images in several ways. In the following paragraphs, you will read about 4 methods you can instantly use to upload the media files you want.   How to Add...

How to Disable Gutenberg in WordPress

If Gutenberg is not suitable for your needs and wish to switch back to the Classic Editor, continue reading, as in this article we will show you 3 simple methods of how to disable the block editor. In the following sections, you will read how to disable Gutenberg by:...

5 Best Gutenberg Plugins for WordPress

One of the fastest and most convenient ways of enhancing the functionalities of Gutenberg is by using various WordPress plugins. Although Gutenberg is very versatile and feature-rich by itself, the open-source nature of WordPress has inspired developers all around the...

How to Add a Contact Form with WordPress Gutenberg Editor

If you are using Gutenberg to craft your WordPress website, then you should know that the process is very easy, especially by using the block editor. In the following paragraphs, you will read how to add one to your pages.   How to Add a Contact Form with...

Ready to Create Your Website?