Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Remove Wordpress Body Classes
- add_filter('body_class','my_class_names');
- function my_class_names($classes) {
- return array();
- }
- add_filter('body_class','my_class_names');
- function my_class_names($classes) {
- global $wp_query;
- $arr = array();
- if(is_page()) {
- $page_id = $wp_query->get_queried_object_id();
- $arr[] = 'page-id-' . $page_id;
- }
- if(is_single()) {
- $post_id = $wp_query->get_queried_object_id();
- $arr[] = 'postid-' . $post_id;
- }
- return $arr;
- }
Add Comment
Please, Sign In to add comment