Title: WP_Customize_Section::render_template
Published: August 18, 2015
Last modified: April 28, 2025

---

# WP_Customize_Section::render_template()

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#see-also)
 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#wp--skip-link--target)

An Underscore (JS) template for rendering this section.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#description)󠁿

Class variables for this section class are available in the `data` JS object; export
custom variables by overriding [WP_Customize_Section::json()](https://developer.wordpress.org/reference/classes/wp_customize_section/json/).

### 󠀁[See also](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#see-also)󠁿

 * [WP_Customize_Section::print_template()](https://developer.wordpress.org/reference/classes/WP_Customize_Section/print_template/)

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#source)󠁿

    ```php
    protected function render_template() {
    	?>
    	<li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}">
    		<h3 class="accordion-section-title">
    			<button type="button" class="accordion-trigger" aria-expanded="false" aria-controls="{{ data.id }}-content">
    				{{ data.title }}
    			</button>
    		</h3>
    		<ul class="accordion-section-content" id="{{ data.id }}-content">
    			<li class="customize-section-description-container section-meta <# if ( data.description_hidden ) { #>customize-info<# } #>">
    				<div class="customize-section-title">
    					<button class="customize-section-back" tabindex="-1">
    						<span class="screen-reader-text">
    							<?php
    							/* translators: Hidden accessibility text. */
    							_e( 'Back' );
    							?>
    						</span>
    					</button>
    					<h3>
    						<span class="customize-action">
    							{{{ data.customizeAction }}}
    						</span>
    						{{ data.title }}
    					</h3>
    					<# if ( data.description && data.description_hidden ) { #>
    						<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text">
    							<?php
    							/* translators: Hidden accessibility text. */
    							_e( 'Help' );
    							?>
    						</span></button>
    						<div class="description customize-section-description">
    							{{{ data.description }}}
    						</div>
    					<# } #>

    					<div class="customize-control-notifications-container"></div>
    				</div>

    				<# if ( data.description && ! data.description_hidden ) { #>
    					<div class="description customize-section-description">
    						{{{ data.description }}}
    					</div>
    				<# } #>
    			</li>
    		</ul>
    	</li>
    	<?php
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-section.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-customize-section.php#L355)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-customize-section.php#L355-L404)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#related)󠁿

| Uses | Description | 
| [_e()](https://developer.wordpress.org/reference/functions/_e/)`wp-includes/l10n.php` |

Displays translated text.

  |

| Used by | Description | 
| [WP_Customize_Section::print_template()](https://developer.wordpress.org/reference/classes/wp_customize_section/print_template/)`wp-includes/class-wp-customize-section.php` |

Render the section’s JS template.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_section/render_template/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.3.0](https://developer.wordpress.org/reference/since/4.3.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_section%2Frender_template%2F)
before being able to contribute a note or feedback.