Gutenberg as default editor to Portfolio (X Theme)

How can enable Gutenberg on Portfolio?

I have tried:

  1. Following Cloudways method;
  2. Installing Custom Post Types Block;
  3. Installing Pods;
  4. Using ACF Pro (provided by X Theme);

Doesn’t work, of course. What can I do? How to solve it?

To enable Cornerstone, ok. I have followed this guide:

Thanks,

Hello NeuroSaber,

Thanks for writing in!

Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

After the child theme is set up, please add the following code in your child theme’s functions.php file

// Add Gutenberg Support to Portfolio items
// =============================================================================
function x_portfolio_gutenberg($args){
  $args['show_in_rest'] = true;
  return $args;
}
add_filter('portfolioposttype_args', 'x_portfolio_gutenberg');
// =============================================================================

We would love to know if this has worked for you. Thank you.

1 Like

Works like a charm. Flawlessly.
Thank you very much.

If you - in a specific post - list a series of functions to enable/disable and change the theme functions, would be really nice. Why not?

Hi NeuroSaber,

It’s good to know that it worked out for you.
You are always welcome.

By the way, what do you mean by this:

If you - in a specific post - list a series of functions to enable/disable and change the theme functions, would be really nice. Why not?

Can you please clarify a little further?

Thanks.

Dear @RueNel

I mean, sort of a collection of functions available on Cornerstone and the theme X or Pro. For example, portfolioposttype_args isn’t explicited as option nor documented, right? Or you have a list of features hidden or not documented?

Hello NeuroSaber,

portfolioposttype_args is a filter which very rarely used. This filter to inject into the arguments of the portfolio custom post type. At the moment, we do not have any comprehensive lists. This knowledge base article should be able to give you a few of the most common actions and filters that most users can use.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.