I assume that all your posts are come from single.php. WordPress provides has_category() function to check if post has specific category.
So your code on single.php will need to be like something in given below
if( !has_category('video') ){
the_post_thumbnail();
}
where it checks if post has ‘video’ category. And if it is false then the feature image will be displayed. otherwise, it can’t. Hope it will be help you.
Related Posts:
- Can I set a default featured image for a category?
- How can I add the featured image functionality to a custom taxonomy?
- How can I make post fields required in WordPress?
- How to add a background image to category and display image on category page
- Display the featured image from the last post
- Different excerpt styles per category, but chronological
- Display child categories in WooCommerce
- How to make a Thumbnails Mosaic
- Display category name on featured image in wordpress excerpt
- Category index featured image
- Display thumbnails for certain category posts
- Random Featured Image Based on Category
- Category images are not displaying in WordPress
- why get_the_post_thumbnail( the_ID()) echos extra post id
- Random category with recent post title and thumbnail
- How to add icon over specific thumb
- Display post thumbnail for specific category outside the loop
- How to add image for all posts associated to specified category?
- How to display WooCommerce category image in my category page banner as a background?
- How to make product image inherit from category image
- show thumbnail for subcategory wordpress
- Custom field picture instead of post thumbnail on category page
- How to enable admins/editors to set a featured image for specific category?
- Featured image for links and categories
- Show thumbnails 1-12 of category x on any given page
- How to display the category featured images [closed]
- In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing
- Multisite – Protect categories from deletion?
- Where/how are categories stored?
- Get top parent category
- How can I prevent users from creating new categories?
- Get child categories when clicking on parent category
- Custom color for each category name
- Block multiple categories from Blog
- Show posts of one category only with Custom Taxonomy on single.php
- Wrap a chosen category name with div
- Category tree is flattened inside admin upon saving
- Get woocommerce catogry
- Get last post date yesterday from each categories not work & double result post
- How do I add a function on a specific post category?
- Open subcategories in submenu on click in primary menu
- How to add Categories to the top menu of the website?
- Multiple categories PROBLEM and Duplicating main categories
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- Retrieve Image from Media Library by it’s category
- Exclude category from fucntion
- Get Unique Categories – Group By?
- Filter Categories in meta box for CPTs
- Site search needs to find posts for category topic AND Tag or keyword thats not in the post
- Get category url in loop
- Previous/next post links displaying wrong category than is desired
- Admin comments and user restrictions
- category url structure
- Order by category titles
- How to conditionally hide author name on Single.php if category is “news”, otherwise if category is something else display author name?
- How to let users choose posts order in categories?
- WordPress category
- Different Output for “Every Other” Foreach Statement?
- And/Or Category Query
- Show subcategories on a parent category page
- not all categories being displayed
- Category archive is displaying all posts rather than the specific category
- Use the category name instead of category slug in permalinks
- How can I display the number of post associated to a category in Twig/Timber WordPress? [closed]
- How to display the parent category if only the child category has been chosen
- Multiple Category Search with and operator in WordPress
- Display list categories from CTP
- Different CSS class by category
- Remove any product that is featured from regular display loop [WooCommerce]
- Latest updated categories list query, exclude one from displaying
- How the posts and categories connected each other in wp 4.1.1?
- Getting parent category hierarchy as objects from category template
- WordPress get_categories & listing recent post thumbnail
- Ordering categories by slug vs. name
- Using in ‘category_name’ in ‘$query->set();’?
- how can i hide category?
- Homepage custom recent news
- post_class remove tag- or category- from slug
- creating categories programmatically
- Assign a list of categories with a parent category
- Custom post type archive category page results in 404
- WP-CLI Add category as menu item main-menu
- Can’t get selected value from wp_dropdown_categories or get_categories
- Blog page with posts from specific categories
- Exclude a category and post_type from wp_query
- loop in single.php of the same category
- Editing categories crashes WordPress site
- Conditional Site Logo(Category Based)
- Tag Menu items based on their categories
- Accessible Subcategory URL’s pages without using .php hack
- in_category(‘category-sluga’) returns true for Archive page of Category ‘category-slugb’
- wp_list_category only showing to logged in uers
- Grouping parent categories into sections
- Querying Multiple Categories With Different Offsets
- altering theme – content generated by PAGES not PORTFOLIO
- How do i add custom post types to this query?
- add new input field like category?
- WordPress excerpt for specific posts in category
- How do I get a single page navigation depending on the previous page?
- Function to reference post meta in place of category Woocommerce