Use reusable blocks • Yoast


Another week, another roundup! We saw WordPress’ growth hit an important milestone last week, and an interesting proposal was made concerning available blocks in the editor. Let’s see what that’s all about! In this edition of my roundup, I also share a few more tricks about the Block Editor itself. And, last but not least, I have a bonus link for you again. Of course I do!

WordPress now powers one-third of the web!

Last week, Joost published an article on the WordPress.org site about WordPress now powering ⅓ of the web. Well, technically it’s ⅓ of the top 10 million sites, but still, that’s a staggering amount of WordPress sites out there now. Go check out his post to learn more.

Block Directory

An interesting proposal for a Block Directory was published on the Make WordPress Core blog that has the potential of being big:

A new type of WordPress plugin that provides blocks and nothing else: Single Block Plugins. These will be hosted in a separate Block Directory section of the Plugin Directory. They will be JavaScript-based, and each plugin will register a single Block. And they will be searchable and installable from within the Gutenberg editor itself.

Alex Shiels

If you’d like to find out more about what this proposal is about, go on and read Alex’ post.

Gutenberg tips and tricks

In a previous roundup, I shared some tips on using Gutenberg. Today I have a few more tips to share on how to best make use of the new Block Editor.

READ ALSO  Ways to Learn More About WordPress

Reusable blocks

The WordPress Block Editor comes with a feature that’s called ‘Reusable block’. This feature allows you to define one specific block or a combination of blocks to be saved and reused anywhere else on the site.

When would you use that, you ask? Maybe you want to highlight one of your products on several pages. Or you have certain posts that need some sort of disclaimer at the bottom. Instead of having to write that same paragraph from scratch every single time, you write it once, save it as a reusable block and select it where needed.

You can save a block to your reusable blocks by clicking ‘More options’ (the icon with three dots in the bar directly above your block) then ‘Add to reusable blocks’. Once you’ve done that, you can find the reusable block when adding a new block. It’ll be at the end of the list under the tab, ‘Reusable’, with the name you gave it.

Use your reusable blocks on other sites

Now that you know how to create reusable blocks, it’s time we make this a bit more exciting! Did you know you can export your reusable blocks from one site and import them on another? Yes, you can! This is how: to access your blocks, click on the icon with the three dots in the top-right corner. Then, select Manage All Reusable Blocks and you’ll be taken to an admin interface where you can export your blocks into a JSON file.

You can import that same JSON file in another site via the same admin interface screen. Isn’t that neat?

READ ALSO  Top 20 WordPress Security Plugins [2019]

Line break, but no new paragraph in Gutenberg?

Here’s a complaint I hear a lot: “Whatever I do, I can’t add a line break without creating a new block”.
Sometimes you just want to go to a new line without creating an entirely new block. Just like I did at the beginning of the previous sentence. It may feel like that’s impossible, but it isn’t. Hitting Shift+Enter creates a line break without a new block. It’s that simple.

Bonus link

Maybe I’m talking to the wrong crowd here, but even if I’m helping just one of you out there, I’m a happy man 🙂

So, this one is for those of you who develop plugins on Github, but have to jump through all kinds of fancy hoops to have those plugins committed to the WordPress.org repo. Our friends at 10Up have released a wonderful solution that allows you to publish your code on Github and only Github.

Their solution makes use of Github’s Action. Once you’ve set up your action and added your WordPress.org credentials, it will actually publish your newly created tag to the WordPress repo. I call that a win! So, if this is for you, go and check out Github Actions for WordPress.

Remkus’ Roundup series



Source link

?
WP Twitter Auto Publish Powered By : XYZScripts.com