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
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- Sub-Sub-Blogs — creating and importing content into a custom sub-type
- Add the current menu item CSS class to a custom page type archive in WordPress menu
- How to Separate CPT From Regular Posts?
- How to check post type (to include custom css)
- Cannot save CPT meta box
- non-hierarchical post type with hierarchical url structure
- WP the_posts() on single-cars.php get category link
- Display an authors post on a single page only when they are logged in
- How to add new post using a form to categories when categories are using as menu
- Custom wordpress loop
- Different post title, keywords and description
- Trying to add a class to post links
- post_content is stripping HTML when adding a new post? [closed]
- How to create Custom image post?
- Display Parent-Child Posts in specific order by comparing IDs in array
- How to display custom field in product description?
- How to display posts with plugin (advanced custom fields) field groups?
- WordPress – display relationship between blog posts and custom posts
- SEARCH QUERIES – REVERSE OUTPUT
- Is there a way to create a sidebar of bullets
- Set a Default CPT taxonomy by taxonomy id
- Need folder for CPT templates for eg: single-{post_type}.php
- How to get the posts that my following users are liked?
- How to insert post 6 times after user register like ask.fm
- WordPress deletes custom posts instead of trash them
- Creating custom post type relationships
- How To Loop Through list with Custom Post Types
- Adding Information To All Posts Screen
- erase post excerpt limitation [×]
- Collection of fields in a single post
- Can’t open Custom Post Types Link in navigation
- Pulling in a particular post into a single page based on the post id passed into the code
- Custom My account page and custom page for editing posts
- What’s the best way to show custom post types? With page template it’s not perfect!
- Get post from custom post type that title is like custom string [closed]
- Delete old thumbnail when updating new