add class to body class wordpress
<body <?php body_class( 'class-name' ); ?>>
add_filter( 'body_class', 'custom_class' );
function custom_class( $classes ) {
if ( is_page_template( 'page-example.php' ) ) {
$classes[] = 'example';
}
return $classes;
}
<body <?php body_class(); ?>>
Also in PHP:
- catching exceptions php
- datetime manual date format
- Symfony\Component\Debug\Exception\FatalErrorException: Allowed memory size of
- composer require laravel/ui not working laravel 7
- create a button add in laravel
- array key sort unique laravel
- angular post phph
- calculate total time from start and end datetime in php
- change url header php
- afficher type et contenu d'une variable php
- capital string php
- contains in php string
- expire Cache Manually laravel
- laravel::all()->distinct()->get();
- data type php varchar
- Jan 5, 2021 15:37:25 time format php
- artisan clear template cache
- datetime format laravel
- base64 image encode php
- echo foreach
- debug native php
- file_get_contents php ssl
- date today in datetime php
- codeigniter last insert id example