Get 'wp_template_part'

I don’t know why but I keep getting:

  "code": "rest_cannot_manage_templates",
  "message": "Sorry, you are not allowed to access the templates on this site.",
  "data": {
    "status": 401

I tried changing some WordPress versions and also enabled the endpoints in the WP REST API Controller plugin (also cleared out the cache in that plugin), but none of it helps.

Hi @phn
How do you using it?
I already installed the plugin, but seems no options to enable it.

Hi @dominique, same issue here.

that’s somehow strange - mine looks similar :slightly_frowning_face:

did you guys upgrade the wordpress site lately? I googled a bit, and found some articles about a similar issue and they’re suggesting that some upgrades, or installations of plugins/themes might cause an issue with the WP permissions:

I had a similar issue. On the WordPress side, I believe you need to add a theme that supports block-template parts.

ie: theme-experiments/emptytheme/block-template-parts at master · WordPress/theme-experiments · GitHub

Pretty much spent all day trying to get template parts up and running but sadly to no avail.

Tried using Wordpress 5.6 and Gutenburg 10.1.1 as per @phn 's example (although Guberg wanted 5.6 so updated there)

Problem for me is the 401 error. Have used WP REST API Controller to enable wp_template_parts but it’s been 401s and tears all day.

Could someone on the Frontity side perhaps give us a demo? Or screenshots of the installation so we can see how the template parts are configured?

@dominique did you get yours working again?

Hi @dawson.custonscole

I didn’t look any further into this any more. I stopped using Frontity, because I had no time to get up to speed with it anymore. I needed to invest time in our regular projects. For adopting headless I am now looking in other directions then Frontity, to be honest.

Thanks for the quick reply @dominique

Do you remember if you did any JWT Auth config to get the template_parts working?

Also, If you don’t mind sharing, what other options do you think you might use, and why?