> For the complete documentation index, see [llms.txt](https://docs.yaycommerce.com/yaymail/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yaycommerce.com/yaymail/developer-zone/api/register-templates/render-templates-content.md).

# Render Templates content

Add the following code to `./template/new-email-1.php` to enable developers to retrieve template content effectively.

```php
<?php

use NewEmail1;

defined( 'ABSPATH' ) || exit;

$template = YourNewEmail::get_instance()->template;

if ( ! empty( $template ) ) {
    $content = $template->get_content( $args );
    yaymail_kses_post_e( $content );
}

```

The `args` variable is an input parameter for the `get_content_html` function within this file. It contains various email details, including the order, email heading, additional content, sent to admin, plain text, and more...

<figure><img src="/files/pxCpUpg0xtQBTr4UGqZt" alt=""><figcaption></figcaption></figure>

Upon receiving the specified variable, this code checks whether the template exists. If it does, the code retrieves the content based on `args` passed in
