Gutenberg Ramp Wordpress Plugin - Rating, Reviews, Demo & Download

Gutenberg Ramp Preview Wordpress Plugin - Rating, Reviews, Demo & Download
No ratings yet
Free
Follow for free plugins, new theme releases and theme news

Plugin Description

Activating Gutenberg Ramp plugin adds a settings screen where you can enable Gutenberg selectively (for specific post types). For even greater control, you can specify Gutenberg loading behavior in code. Ramp works with both the plugin version of Gutenberg, and the core version, providing a seamless transition.

Visit Settings -> Writing to enable Gutenberg by post type. Screenshots here

To enable Gutenberg 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 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
  • post_ids (Array of post_ids): loads Gutenberg for the specified post_ids
  • post_types (Array of post_types): loads Gutenberg for the specified post types.

Code Examples

Load Gutenberg for all posts:
if ( function_exists( 'gutenberg_ramp_load_gutenberg' ) ) {
gutenberg_ramp_load_gutenberg();
}

Never load Gutenberg:
`
gutenberg_ramp_load_gutenberg( false );

// Alternatively, you can use the load key to always disable Gutenberg:
gutenberg_ramp_load_gutenberg( [ ‘load’ => 0 ] );
`

Load Gutenberg only for posts with ids 12, 13 and 122:
gutenberg_ramp_load_gutenberg( [ 'post_ids' => [ 12, 13, 122 ] ] );

Load Gutenberg for post_id: 12 and all posts of type test and scratch:
php
gutenberg_ramp_load_gutenberg(
[
'post_types' => [ 'test', 'scratch' ],
'post_ids' => [ 12 ],
]
);

Advanced

The typical use case is as shown above, the parameters do not change except when theme code is updated.

If making more dynamic changes, note that the parameter supplied is persisted in a site option; when the parameters are changed in code, one page load is necessary to update the site option before the editor can use the new setting.

Contributions

Contributions are welcome via our GitHub repo.

Screenshots

  1. Settings for Gutenberg Ramp via Settings -> Writing

    Settings for Gutenberg Ramp via Settings -> Writing


Reviews & Comments