Skip to main content
Rollback to Revision 1
Source Link
Piyush Rawat
  • 773
  • 1
  • 7
  • 18

You can pass your class as argument

<body <?php if ( is_page_templateis_home( 'post-template.php' )) { body_class('my-class'); } else { body_class(); }?>>

You can pass your class as argument

<body <?php if ( is_page_template( 'post-template.php' )) { body_class('my-class'); } else { body_class(); }?>>

You can pass your class as argument

<body <?php if ( is_home()) { body_class('my-class'); } else { body_class(); }?>>
added 30 characters in body
Source Link
Piyush Rawat
  • 773
  • 1
  • 7
  • 18

You can pass your class as argument

<body <?php if ( is_homeis_page_template( 'post-template.php' )) { body_class('my-class'); } else { body_class(); }?>>

You can pass your class as argument

<body <?php if ( is_home()) { body_class('my-class'); } else { body_class(); }?>>

You can pass your class as argument

<body <?php if ( is_page_template( 'post-template.php' )) { body_class('my-class'); } else { body_class(); }?>>
Source Link
Piyush Rawat
  • 773
  • 1
  • 7
  • 18

You can pass your class as argument

<body <?php if ( is_home()) { body_class('my-class'); } else { body_class(); }?>>