Skip to content

Instantly share code, notes, and snippets.

@jpmarchand
Last active November 9, 2015 16:55
Show Gist options
  • Select an option

  • Save jpmarchand/73ad786fa409c25d3351 to your computer and use it in GitHub Desktop.

Select an option

Save jpmarchand/73ad786fa409c25d3351 to your computer and use it in GitHub Desktop.
<?php
//* Remove .page class from page template file portfolio.php
add_filter('body_class', 'prefix_remove_body_class', 20, 2);
function prefix_remove_body_class($wp_classes) {
if (is_page_template('portfolio.php')):
foreach ($wp_classes as $key => $value) {
if ($value == 'page') unset($wp_classes[$key]);
}
endif;
return $wp_classes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment