Documentation / Tutorials / Awesome Apps

How To Enable Gutenberg Block in Awesome App Pages

/ Awesome Apps / How To Enable Gutenberg Block in Awesome App Pages

We recently needed to enable Gutenberg blocks in awesome app pages here is how you can enable Gutenberg block for Awesome app pages.

In the example below, we are enabling the block editor for p_contentcentral post type, which is used by an Awesome App.

In the site-specific.php file add the following code

This code is used to remove the p_contentcentral from the awesome post type collection so as to hide the code editor that shows in Awesome App pages.

Finally, you will have to register the p_contentcentral using Custom post type UI plugin with the following options

  • Capability Type set as page,
  • Hierarchical set as True,
  • Show in REST API‘ setting as True,
  • Show in Menu set as False,
  • Rewrite set as True,
  • Custom Rewrite Slug set as the slug of the App whose page we are overwriting,
  • With Front set as False.
  • Editor selected in Supports section.

Once this is done, you can start using Gutenberg Block Editor on awesome app pages.

Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *