You can use body_class filter to check if you are on your custom post type, and if so then just remove the blog class like this:
function remove_blog_from_cpt_classes($classes, $class){
global $post;
if ($post->post_type != "products"){
return $classes;
}else{
foreach($classes as &$str){
if(strpos($str, "blog") > -1){
$str = "";
}
}
}
return $classes;
}
add_filter("body_class", "remove_blog_from_cpt_classes", 10, 2);
Hope this helps
Related Posts:
- What does this PHP function code mean? [closed]
- Restrict custom post type to only site administrator role
- Linking Two Post Types
- How to force one column layout on custom post type edit page?
- modify all posts of a category to “no comments allowed”
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- Showing current taxonomy terms
- automatically create taxonomy with same name as post title
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- Custom Post Type by user
- saving custom post type data to different table in wordpress
- Query post types with multiple keys
- [Plugin: Posts 2 Posts] Changing display order of connections
- same archive template for different custom post
- How do you use JavaScript to detect the homepage
- Get all posts WHERE custom_field is LIKE value
- Get the post children count of a post
- How to delete all posts from a custom post type?
- Check Title Unique Or Not and If not error message and dont save
- Remove All, Published and Trashed Post Views in Custom Post Type
- How to post twitter like updates on wordpress
- Show Two custom Post type and their posts on category page
- apply filters only to specific post listing without check the url parameters
- Deleting Custom Post type data using mySQL command
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- Display only one post each WEEK
- List custom taxonomy specific to one custom post type
- Meta query for custom post type ignored in main query
- Show titles, date of all posts on single category page
- Update postmeta Parent when post_status child change
- Allow users to create posts without logging in?
- How to sort posts in a custom post type by title in ascending order by default?
- Redirect to another page using contact form 7? [closed]
- Get_the_terms restrict output
- Custom post type menu
- YOAST SEO won’t work on custom post type archive [closed]
- Separate Content from gallery (custom post type)
- Posts are not rendering perfectly [closed]
- WordPress Count posts within a custom post type
- Custom post type tags not showing in search
- How set template for “custom post type” individual post
- Why is my custom post content only viewable when signed into WordPress?
- Adding specific custom fields (images) to post excerpt
- Limit posts per page depending on the size of a div?
- Delete Post by User
- creating a custom post template
- Problem to get the link of the default ‘post’ post type like the orther custom types
- Change Background Color For CPT Template
- One Post with different content, depending on a Page
- Custom Post Type
- Display all post types together
- Turn post into simple slideshow
- Multiple Block Quotes without using HTML
- Query multiple post of which one by taxonomy
- How to make a template for a specific post of a custom post type?
- How to delete unnecessary custom post types in the UI
- How to create a job post by email parsing? [closed]
- show posts under custom post type with same autj
- How to automate the creation of advanced layout article/post
- display posts, pages and custom post types from another wordpress site
- is therer any wordpress function to retrieve a specific html element from post content
- How to develop Knowledge center in WordPress Website
- ACF – Tags not showing up in Custom Post Types
- Remove slug from custom post type post URLs
- How to get post content by calling ajax?
- How to set a default format for a custom post type?
- Get category id from post id of a custom post type
- WordPress Custom Post Types with a page as a parent?
- Limit widget to a specific registered sidebar
- WP_List_Table Inside Metabox Not Working on Submit
- Delete all the custom post types when deleting user
- Correct way to use a form to to filter custom posts by taxonomy terms?
- White screen error for a custom theme
- Newer/Older posts links display same posts on every page
- CSS for Custom Post Types
- How can I remove categories in menu in custom post type?
- custom sortable column
- Search results ordered by custom post types are not grouped
- Display “Post 2 of 4” on single post page?
- How to embed form data within the ‘Add new post’
- Remove POST_TYPE from custom post type permalink
- When viewing single parent post, display list of children
- Limit Authors to their Own Posts on front-end excluding admins
- Remove Post Page “View Post” Link
- How to make post sticky in the admin page?
- How does the $post_type global variable work?
- Loop on front-page.php
- Exclude child pages from archive.php
- Placeholder in HTML editor text area?
- List children on child post
- Restrict custom post type from appearing with ?post_types=
- Customize my custom taxonomy table in Admin panel
- How do I do this with WordPress? Taxonomies?
- Display Ad on Specific Categories
- Time based access control of custom post types – what is good approach?
- Set up post page like JAMA articles
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- A form that can save/edit after first input