templates and template parts are not accessible from wordpress rest api
-
it appears when I open a template in page preview mode. but I can’t get it from rest api. Only the blocks that I saved in the block editor appear in the rest api. see pictures for a better example:
I added a paragraph block to the block editor:In template edit mode, I have two template sections, header and footer. and I also have post content:
I see all the content in page preview mode. including the footer header and the content I added in the block editor:
but in rest api I can only get the content I added to the block editor.
Since I can’t get the templates I use from rest api. what’s the point of using templates? If you could help with this situation, I would greatly appreciate it.
-
Hi there!
It sounds like your question is more geared towards the WordPress.org software rather than the hosted WordPress.com sites we have. Please post on the WordPress.org support forum. Folks over there can help you with your question better.
Thanks!
-
I never noticed such a thing until you mentioned it. The strange thing is that although I asked a few similar questions before, no one directed me. Thank you for your help
- The topic ‘templates and template parts are not accessible from wordpress rest api’ is closed to new replies.