Title: WP_Customize_Panel::content_template
Published: August 18, 2015
Last modified: May 20, 2026

---

# WP_Customize_Panel::content_template()

## In this article

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

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

An Underscore (JS) template for this panel’s content (but not its container).

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

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

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

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

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

    ```php
    protected function content_template() {
    	?>
    	<li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>">
    		<button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text">
    			<?php
    			/* translators: Hidden accessibility text. */
    			_e( 'Back' );
    			?>
    		</span></button>
    		<div class="accordion-section-title">
    			<span class="preview-notice">
    			<?php
    				/* translators: %s: The site/panel title in the Customizer. */
    				printf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
    			?>
    			</span>
    			<# if ( data.description ) { #>
    				<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>
    		<# if ( data.description ) { #>
    			<div class="description customize-panel-description">
    				{{{ data.description }}}
    			</div>
    		<# } #>

    		<div class="customize-control-notifications-container"></div>
    	</li>
    	<?php
    }
    ```

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

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

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

Displays translated text.

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

Retrieves the translation of $text.

  |

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

Render the panel’s JS templates.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_panel/content_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_panel%2Fcontent_template%2F)
before being able to contribute a note or feedback.