get_post_thumbnail return featured image for post. in order to get a thumbnail of the category, you need to fetch it through term meta.
global $wp_query;
$cat = $wp_query->get_queried_object();
$thumbnail_id = get_term_meta( $cat->term_id, 'thumbnail_id', true );
$image = wp_get_attachment_url( $thumbnail_id );
on the product page, since there can be multiple terms for a single product,
you need to fetch terms for that product first and then extract a thumbnail image of a specific term.
Related Posts:
- Display the featured image from the last post
- Random Featured Image Based on Category
- Category images are not displaying in WordPress
- How to add image for all posts associated to specified category?
- How to make product image inherit from category image
- Can I set a default featured image for a category?
- Woocommerce get category image full size
- 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
- 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
- Add Image Size for one Media Category Only
- Extract image url associated to a category
- Retrieve Image from Media Library by it’s category
- Show category images on single product page and product overview page
- Category index featured image
- Link Attachment Image to Category
- Change thumbnail image depending product category
- category image taxonomy
- get_post_meta not working on category.php
- Redirect to another page using contact form 7? [closed]
- Display thumbnails for certain category posts
- why get_the_post_thumbnail( the_ID()) echos extra post id
- How do you use the featured image of the most recent post in a category as the background image
- Need to echo category id in multi-dimensional array
- Category view with contents of [gallery]s shown
- 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 hide featured images of all posts falling under the same category in wordpress?
- show thumbnail for subcategory wordpress
- How to display categories image in loop homepage WordPress
- Change background image page header overlay for each category
- Image Upload Custom Form Field for Category and Custom Taxonomy
- How to hide/remove featured images in particular categories post?
- Icon images across multiple categories
- How to show category image if no featured image is set?
- Media Categories as Classes on WordPress Gallery Shortcode
- How to relocate images
- Custom field picture instead of post thumbnail on category page
- In a shared site, how to get products in a category from one site to another?
- Display one post on category.php: Wrong featured image
- How to enable admins/editors to set a featured image for specific category?
- Category page with gallery for each post
- Retrieve post thumbnails
- Image menu showing categories in page
- Featured image for links and categories
- Get all first images of posts in same category
- Show thumbnails 1-12 of category x on any given page
- Add category image before post title on homepage
- How to display the category featured images [closed]
- how do i set an image for a category in admin panel
- How to link images of one WP site to another WP site?
- How to create a photo gallery that can be filtered by the image categories
- Images as Categories
- In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing
- How can I hide a category from Contributors in the edit/add new post screen?
- Featured image shortcode
- Category page doesn’t use category.php, instead it redirects to homepage
- Multiple post categories – single permalink
- How might I retrieve a featured post image from an external WP site and display it as a link back?
- Create product category and keyword search form in woocommerce? [closed]
- Exclude most recent posts from specific category in wp_query()
- Display all posts with same title
- How to add a rel attribute to images that contains their categories?
- How to display a description of a given category from a custom taxonomy
- Lazyload post thumbnails
- Create blog page only to see one category
- Looking for the best solution to build this Blog structure? Picture attached?
- How Can I Display Categories Description
- Specified number of categoy posts not showing correctly
- Set Current Category to Active in category.php
- WordPress query via checkbox form
- How to limit number of attachments
- WordPress returns old thumbnail size after changing media settings
- How to add custom color fields to the category edit page?
- Target a specific category from a custom taxonomy?
- How to modify the output of wp_terms_checklist when used within the built-in category metabox on edit posts?
- Category page returns 404 error
- How do I export the headlines of all the blog posts in a single category?
- Category post count is not correct
- Show audio player only in specific post type category
- display current portfolio categories from a specific parent
- Show featured image in all posts
- selecting categories that have products with tag/category
- Media Library Category Exclude Tree
- How to display child-category PAGES on a category page
- How get all media from a posts category by db?
- Cant get unique_array() work on get_the_category() foreach loop
- get_categories returns top-level categories instead of child categories
- Show posts from all categories
- how to Specifies an author / editor to edit one category only?
- Show one same template for two category
- My Query is getting the wrong data
- Display post content from category name using ajax
- Echo Category In Loop
- Replace category titles inside RSS feed