Divi Template Hooks
Learn about the hooks that are available in Divi’s template files.
footer.php
et_after_main_content
Fires after the main content, before the footer is output.
Type: Action
Since: 3.1
header.php
et_head_meta
Fires in the head, before wp_head()
is called. This action can be used to insert elements into the beginning of the head before any styles or scripts.
Type: Action
Since: 1.0
et_html_top_header
Filters the HTML output for the top header.
Type: Filter
Since: 3.1
Param | Type | Description |
---|---|---|
$top_header | string |
HTML output for the top header |
et_html_slide_header
Filters the HTML output for the slide header.
Type: Filter
Since: 3.1
Param | Type | Description |
---|---|---|
$slide_header | string |
HTML output for the slide header |
et_html_logo_container
Filters the HTML output for the logo container.
Type: Filter
Since: 3.1
Param | Type | Description |
---|---|---|
$logo_container | string |
HTML output for the logo container |
et_header_top
Fires at the end of the et-top-navigation element, just before its closing tag.
Type: Action
Since: 1.0
et_html_main_header
Filters the HTML output for the main header.
Type: Filter
Since: 3.1
Param | Type | Description |
---|---|---|
$main_header | string |
HTML output for the main header |
et_before_main_content
Fires after the header, before the main content is output.
Type: Action
Since: 3.1
index.php
et_pb_index_blog_image_width
Filters the width used to retrieve featured images via wp_get_attachment_image_src()
.
Type: Filter
Since: 1.0
Param | Type | Description |
---|---|---|
$width | string |
Width value as a string |
et_pb_index_blog_image_height
Filters the height used to retrieve featured images via wp_get_attachment_image_src()
.
Type: Filter
Since: 1.0
Param | Type | Description |
---|---|---|
$height | string |
Height value as a string |
page.php
et_pb_index_blog_image_width
See index.php above for definition.
et_pb_index_blog_image_height
See index.php above for definition.
single.php
et_before_content
Fires right before the_content()
is called.
Type: Action
Since: 1.0
et_pb_index_blog_image_width
See index.php above for definition.
et_pb_index_blog_image_height
See index.php above for definition.
single-project.php
et_pb_portfolio_single_image_width
Filters the width used to retrieve featured images via wp_get_attachment_image_src()
.
Type: Filter
Since: 1.0
Param | Type | Description |
---|---|---|
$width | string |
Width value as a string |
et_pb_portfolio_single_image_height
Filters the height used to retrieve featured images via wp_get_attachment_image_src()
.
Type: Filter
Since: 1.0
Param | Type | Description |
---|---|---|
$height | string |
Height value as a string |