Description
Activating Gutenberg Ramp plugin adds a settings screen where you can enable Gutenberg Editor selectively (for specific post types). For even greater control, you can specify Gutenberg loading behaviour in code. Ramp works with both the plugin version of Gutenberg Editor, and the core version, providing a seamless transition.
Visit Settings -> Writing to enable Gutenberg Editor by post type. Screenshots here
To enable Gutenberg Editor for specific post IDs and for a more granular level of control, developers can use the gutenberg_ramp_load_gutenberg()
function as outlined below.
For Developers
Loading behaviour is controlled by the gutenberg_ramp_load_gutenberg()
function, to be added in your theme functions.php
. Calling this function without its single optional parameter causes Gutenberg Editor to load on all post-edit screens. An optional associative array of criteria can be passed. The possible keys and values are:
load
(Int):0|1
: never or always load Gutenberg Editorpost_ids
(Array of post_ids): loads Gutenberg Editor for the specified post_idspost_types
(Array of post_types): loads Gutenberg Editor for the specified post types.
Code Examples
Load Gutenberg Editor for all posts:
if ( function_exists( 'gutenberg_ramp_load_gutenberg' ) ) {
gutenberg_ramp_load_gutenberg();
}
Never load Gutenberg Editor:
gutenberg_ramp_load_gutenberg( false );
// Alternatively, you can use the load key to always disable Gutenberg:
gutenberg_ramp_load_gutenberg( [ 'load' => 0 ] );
Load Gutenberg Editor only for posts with ids 12, 13 and 122:
gutenberg_ramp_load_gutenberg( [ 'post_ids' => [ 12, 13, 122 ] ] );
Load Gutenberg Editor for post_id: 12
and all posts of type test
and scratch
:
gutenberg_ramp_load_gutenberg(
[
'post_types' => [ 'test', 'scratch' ],
'post_ids' => [ 12 ],
]
);
Contributions
Contributions are welcome via our GitHub repo.
Installation
- Install & activate the plugin through the WordPress “Plugins” dashboard.
- Visit Settings -> Writing to enable Gutenberg Editor for specific post types like Pages, Posts, and any custom post types. Screenshots here.
- To enable Gutenberg Editor for specific post IDs and for a more granular level of control, developers can use the
gutenberg_ramp_load_gutenberg()
function as outlined here.
FAQ
- Why is a post type disabled (greyed out) on my settings screen?
-
If you’re seeing something greyed out, it means the
gutenberg_ramp_load_gutenberg()
function is already in your theme functions.php. If you want to use the wp-admin UI, remove the conflicting function from your functions.php file. - Some post types are not showing up on the settings screen
-
Post types that are not compatible with Gutenberg Editor will not show up. If you think you have found a false negative (posts in that post type DO work with Gutenberg Editor, when Ramp plugin is deactivated) please report it as an issue on GitHub here.
- Can I contribute to this plugin?
-
Absolutely! Please create issues and pull requests on GitHub here.
Reviews
Contributors & Developers
“Gutenberg Ramp” is open source software. The following people have contributed to this plugin.
Contributors“Gutenberg Ramp” has been translated into 12 locales. Thank you to the translators for their contributions.
Translate “Gutenberg Ramp” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Change log
1.1.0
- prepares Gutenberg Ramp for WordPress 5.0+ release
- deprecates support for Gutenberg Editor Plugin versions older than 3.5+
- no longer caches load decision in
gutenberg_ramp_load_critera
option - removed
gutenberg_ramp_option_name
filter - adds unsupported post types notice
- adds support for multiple function calls to
gutenberg_ramp_load_gutenberg()
1.0.0
- initial release