File Block

Go back to the list of Blocks

The File Block allows you to add a link to the downloadable files on your website.

In this video, you can see how to use the file block and the different settings to customize it.

How to add a File block to your post or page:

  1. To add a File block, use the Block Inserter (+), or you can type /file in a new paragraph block and press enter.
How to add a File block

Detailed instructions on adding blocks

  1. To add a file, you can use the upload button to upload your files directly from your computer, or you can click Media Library to add files from your media library.
How to upload a file

After you add a file, you can edit the file name by typing inside the rectangle. You can click Replace to replace the file and upload another one. You can click Copy URL to copy the URL of the file.

Block toolbar in the File block

If you try to upload an unsupported file, you will see an error notification at the bottom-left corner of the screen.

Error message when an unsupported file format is uploaded

Block Toolbar

Every block comes with unique toolbar icons and block-specific user controls that allow you to manipulate the block right in the editor.

The File block has seven buttons:

  • Transform to
  • Drag icon
  • Move handles
  • Change alignment
  • Replace
  • Copy URL
  • More options
Block toolbar in the File block

Transform to:

When you click on the Transform button you can convert the File block into a Group, Columns, or Image block.

Transform tool in the File Block

The Group gives you the ability to change the background color around the File block.

Adding background color to the File Block group

Drag icon

Drag icon in the File Block

To drag and drop the block to a new location on the page template, click and hold the rectangle of dots, then drag to the new location. The blue separator line indicates where the block will be placed. Release the left mouse button when you find the new location to place the block.

Move handles

Move handles in the File Block

The up and down arrow icons can be used to move a block up and down on the page.

Get more information about moving a block within the editor.

Change Alignment

Change alignment in the File Block

Using the alignment drop-down from the toolbar, you can align the file block to the left, make it center-aligned, or align it to the right. You can also make the file block wide width and full width.

Replace

Using the Replace button, you can replace your file by uploading a new one from your device or adding another one from your media library.

Replace file in the File Block

Copy URL

Click Copy URL to copy the URL of the file to your clipboard. You will see a message on the bottom left corner of your browser saying the URL has been copied.

Copy URL to clipboard message in the File Block

More Rich Text Controls

Clicking on the file name in the File block will display three more buttons in the Block Toolbar – Bold, Italic, and More Rich Text controls.

Rich Text controls in the File Block

Use the “Bold” option or “Ctrl+B” / “Cmd+B” on your keyboard to bold it, which is usually heavier than the surrounding text.

Bold option in the File Block

Use the “Italic” option or “Ctrl+I” / “Cmd+I” on your keyboard to italicize it, which usually appears slanted to the right.

Italic option in the File Block

More Rich Text controls

Highlight

Use the Highlight option to change the color of the selected text and its background.

More rich text controls in the File Block

Inline code

Use the Inline code feature to format code snippets within your text differently. Not only that, but Inline code formatting also prevents the code to be executed instead of displayed.

Inline image

The Inline image feature allows you to add an image to your block. It has one option: enter the desired pixel width for your image.

Keyboard Input

The Keyboard Input option allows you to add the <kbd> tag to selected text.

Strikethrough

Use the Strikethrough option to place a horizontal line through the middle of the selected text.

Example: File Block

Subscript

Use the Subscript option to set the selected text slightly below the normal line of type.

Example: File Block

Superscript

Use the Superscript option to set the selected text slightly above the normal line of type.

Example: File Block

More Options

The More Options menu represented by three vertical dots on the far right of the toolbar gives you more features such as the ability to duplicate, remove, or edit your block as HTML.

Read about these and other settings.

Block Settings

Every block has specific options in the editor sidebar in addition to the options found in the block toolbar. If you do not see the sidebar, simply click the cog icon next to the Publish or Update button.

Cog icon in the File Block

The File block offers the following settings

Settings

You can choose whether to link to the media file directly or a separate attachment page by using the drop-down menu. If you want the media file/attachment page to open in a new tab, enable the Open in a new tab button.

The File block comes with a Download button that can be toggled on and off using the Show download button.

By toggling it off, the file name will appear as a link.

Block Sidebar in the File Block


If you upload a PDF file, you’ll see a PDF settings section on the block settings.

PDF settings

You can embed PDF on your page or post by enabling the Show inline embed option. When it’s enabled, you’ll see the height in pixels setting that lets you adjust the PDF display by using the slider or entering a value in pixels.

PDF settings to adjust the height in pixels for the display

Advanced

The Advanced tab lets you add HTML anchor and CSS class(es) to your block.

Advanced tab in the File Block
The advanced section lets you add HTML anchor and a CSS class to your block.

HTML anchor allows you to make a unique web address for the File block. Then, you’ll be able to link directly to the File block on your page.

The Additional CSS class(es) lets you add CSS class(es) to your block, allowing you to write custom CSS and style the block as you see fit.

Changelog

  • Updated 2023-08-13
    • Updated More Options
  • Updated 2022-11-16
    • Updating screenshots, video and content for 6.1, added info for PDF settings
  • Updated 2022-06-21
    • Updated content and screenshots for 6.0
    • Added ALT Tags for images
  • Updated 2022-06-07
    • Add video for 6.0
  • Updated 2020-09-19
    • Updated new block toolbar features
    • Updated new block settings features
    • Updated 5.5 screenshots
  • Updated 2020-06-18
    • Added ‘Link back to blocks’ to the top of the page
    • Converted the ‘Advance’ reusable block to a regular block
    • Added the ‘Changelog’
  • Created 2019-03-07

Was this article helpful? How could it be improved?

First published

Last updated