Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

WordPress hook directory
body_class

Description

Applied to the classes for the HTML <body> element. Called in the get_body_class function. Filter function arguments: an array of class names and an array of additional class names that were added to the first array.

This description was scraped automatically from the WordPress filter reference or action reference. If it looks like this is the wrong description, please tell me so I can fix my code.

WordPress version history for body_class

This database has information for all major versions from WP 1.2.1 through 6.2.

Version File Line Type
2.8 wp-includes/post-template.php 480 View in context filter
2.9 wp-includes/post-template.php 480 View in context filter
3.0 wp-includes/post-template.php 487 View in context filter
3.1 wp-includes/post-template.php 540 View in context filter
3.2 wp-includes/post-template.php 543 View in context filter
3.3 wp-includes/post-template.php 550 View in context filter
3.4 wp-includes/post-template.php 544 View in context filter
3.5 wp-includes/post-template.php 558 View in context filter
3.6 wp-includes/post-template.php 563 View in context filter
3.7 wp-includes/post-template.php 566 View in context filter
3.8 wp-includes/post-template.php 566 View in context filter
3.9 wp-includes/post-template.php 658 View in context filter
4.0 wp-includes/post-template.php 680 View in context filter
4.1 wp-includes/post-template.php 686 View in context filter
4.2 wp-includes/post-template.php 719 View in context filter
4.3 wp-includes/post-template.php 728 View in context filter
4.4 wp-includes/post-template.php 737 View in context filter
4.5 wp-includes/post-template.php 758 View in context filter
4.6 wp-includes/post-template.php 766 View in context filter
4.7 wp-includes/post-template.php 770 View in context filter
4.8 wp-includes/post-template.php 770 View in context filter
4.9 wp-includes/post-template.php 770 View in context filter
5.0 wp-includes/post-template.php 778 View in context filter
5.1 wp-includes/post-template.php 815 View in context filter
5.2 wp-includes/post-template.php 843 View in context filter
5.3 wp-includes/post-template.php 832 View in context filter
5.4 wp-includes/post-template.php 834 View in context filter
5.5 wp-includes/post-template.php 836 View in context filter
5.6 wp-includes/post-template.php 836 View in context filter
5.7 wp-includes/post-template.php 836 View in context filter
5.8 wp-includes/post-template.php 836 View in context filter
5.9 wp-includes/post-template.php 836 View in context filter
6.0 wp-includes/post-template.php 836 View in context filter
6.1 wp-includes/post-template.php 853 View in context filter
6.2 wp-includes/post-template.php 859 View in context filter

Related Hooks

We find related hooks using word stems. body_class has 2 significant word stem(s): body, class. Note that some of the hooks below may not appear in all versions of WP.