Example of enabling comments in WordPress

For more information about the requirements for comments and authorization resources, see the Adding authorization and Adding commenting sections.

To add commenting, do the following:

  1. Step 1. Create a resource that returns the list of comments
  2. Step 2. Create a resource that adds a comment
  3. Step 3. Connect and check the comments

Step 1. Create a resource that returns the list of comments

  1. In your WordPress site repository, create the /api/turbo/comments.php file.
  2. Copy the content api/turbo/comments.php to the created file comments.php.

Learn more about the comments.php file in tutorial video (15:08).

Step 2. Create a resource that adds a comment

  1. Create the /api/turbo/createcomment.php file in your site repository.
  2. Copy the api/turbo/createcomment.php file content to the createcomment.php file you created.

Learn more about the createcomment.php file in tutorial video (17:34).

Step 3. Connect and check the comments

  1. In Yandex.Webmaster, go to the Turbo pages → Settings → Comments page.
  2. Specify links to resources:
    • URL of the comments list, for example, https://my-domain.ru/api/turbo/comments.php.
    • URL for adding a comment, for example, https://my-domain.ru/api/turbo/createcomment.php
  3. Save your changes.
  4. Check the comments display on the sample Turbo page.