-
Hello Rank Math Team,
I am building an automation workflow to create posts programmatically using the WordPress REST API (POST /wp/v2/posts). My system generates the full post content, and I need to correctly include your Table of Contents block.
My Question:
What is the officially supported and correct method to programmatically add a functional Rank Math Table of Contents block to a post created via the WordPress REST API?
Should I be using:
a) A specific HTML structure or block comment in the content field? If so, what is the exact, validated syntax?
b) A specific set of meta fields to enable and configure the TOC? If so, what are the correct meta keys?
c) Another method I am not aware of?My goal is to have the TOC block appear correctly in the post, without causing any validation errors in the block editor.
Thank you for your time and for cái great plugin.
Best regards,
Jefferson Fujii
The ticket ‘How to correctly insert/enable the TOC block via the WordPress REST API?’ is closed to new replies.