Plugin / Gutenberg Ramp

Description

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:

gutenberg_ramp_load_gutenberg(
    [
        'post_types' => [ 'test', 'scratch' ],
        'post_ids'   => [ 12 ],
    ]
);

Contributions

Contributions are welcome via our GitHub repo.

Ratings

4.7
3 reviews

Rating breakdown

Details Information

Version

1.1.0

First Released

26 May, 2018

Total Downloads

12,179

Wordpress Version

4.9.8 or higher

Tested up to:

5.0.7

Require PHP Version:

5.5 or higher

Tags

Contributors

Languages

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.