• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

How to hide Openverse section in WordPress block editor

Learn in this tutorial how to hide Openverse block pattern directory in WordPress editor using code.

WordPress 6.2 introduced quite a few new features, including the option to access Openverse from the block editor.

In case you’re not familiar with it, Openverse is a project that allows you to search and share free and open licensed creative content.

With this WordPress integration, users can find and use images, videos, audios and other creative resources without having to worry about copyright and licensing, making it easier to create and use content on the web.

Openverse section within the media tab of the WordPress editor
Openverse section within the media tab of the WordPress editor

This is a fantastic feature, but as always, on some client sites you may prefer to disable it. For example, if you want to ensure that there is consistency between the images displayed, etc.

So here’s how to stop Openverse from appearing in the block editor.

Snippet to hide Openverse in WordPress editor

Add the following snippet in functions.php:

To see this and another 997 code snippets of this website, login or subscribe here.

It’s as simple as that. Now the Openverse section will no longer appear when exploring the block editor media section.

Media tab without Openverse
Media tab without Openverse

Conclusions

The arrival of Openverse integration with WordPress is fantastic news, but there will always be projects where it may be interesting not to show this option. Now you know how to do it. 😉

Any questions? Let me know in the comments.

And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉


Block Editor PHP WordPress

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

close-icon

Lost your password?