Please, how to use your plugin for custom taxonomies with my CPT created by Crocobloks
]]>Based on this now closed topic:
https://www.ads-software.com/support/topic/lost-post-images-and-delete-is-not-working/I’ve
looked at the code and tried the plugin. It in fact is supposed to force the category image to be used for all posts in the given category. SO IT DOES NOT DESIGNED TO HAVE IMAGES FOR THE CATEGORIES THEMSELVES, but it will instead override the featured image on all posts. There should be warnings all around the plugin page and the UI in large, red letters! This could cause a disaster on a production website.
BEWARE!
]]>Is there a way to just set multiple feature images for a single post but then also set what category the extra images are used for?
]]>When this plugin is activated, it is not possible to set featured image for any WooCommerce product.
]]>After installing this plugin, I got a bug as my Featured Images are automatically unset whenever I publish a post or update a post. I thought it is due to any other thing but when I disable this then everything was fine.
Please fix this issue.
]]>Hi, First, thanks for this plugin.
I think I might found a bug.
It seems to work when only 1 category (with the desired featured image) has been applied.
However I have posts where 3 categories are applied. 2 of them have no category image, 1 does. I would like to have that one applied.
When removing 1 of the categories without an image and click apply on the post it works. But applying all 3 categories to a new post it doesn’t.
Have you seen this behaviour before? If necessary I can provide images.
Kind Regards,
Roy
Hello,
Thank you for creating a great plugin! But I found that when used with Polylang, the featured image cannot be loaded and cannot be replaced. How can I solve this?
Hi again ??
As plugin users are having problem setting thumbnails because this plugin is overriding the post thumbnail. I have wrote a fix for this.
This fix sets featured image in following condition
1. When thumbnail is enabled.
2. When post doesn’t already have a thumbnail. This fixes issue lots of people having.
# Fix
class-categoryfeaturedimage.php
/** ==================================================
* Update thumbnail meta data of a post to category thumbnail.
* Only updates if post doesn't have a thumbnail image set by user.
*
* @param int $post_id post_id.
* @since 2.00
*/
public function update_thumbnail( $post_id ) {
// Skip if current theme doesn't support post thumbnails
if ( ! current_theme_supports( 'post-thumbnails' ) ) {
return;
}
// Skip post thumbnail update if thumbnail is already set in the post
if ( has_post_thumbnail( $post_id ) ) {
return;
}
$term_id = $this->choose_term( $post_id );
if ( 0 < $term_id ) {
$featured_image_id = intval( get_term_meta( $term_id, 'featured_image_id', true ) );
update_post_meta( $post_id, '_thumbnail_id', $featured_image_id );
} else {
delete_post_meta( $post_id, '_thumbnail_id' );
}
}
Here is a gist url for your continence!
https://gist.github.com/prionkor/5207a953fbc9590acf104431f74719e2
I have tested it but please test yourself as well. Let me know if you have any comments.
]]>Hi,
I am using a plugin called s3 uploads this plugin is conflicting with that one creating fatal error. I have also contacted with that plugin author as well. Meanwhile there is a small fix if you could do that makes life easier.
lib/class-categoryfeaturedimage.php
on line 183
$featured_image_id = get_term_meta( $term_id, 'featured_image_id', true );
to
$featured_image_id = (int) get_term_meta( $term_id, 'featured_image_id', true );
A simple typecasting to fix the issue. If you maintain a git repo let me know I can make a PR if needed.
]]>This plugin breaks the WP standard feature image for posts. The featured image gets removed from post after each save.
I’d really love this to work but I have to deactivate until you fix this issue.
]]>After latest wordpress update i cant set feature image manualy on any post till i disable this plugin
]]>Hi,
thanks for your very useful plugin!!
However, NGINX reports many errors like this:
2020/03/26 17:23:27 [error] 11616#11616: *11742 FastCGI sent in stderr: “PHP message: PHP Warning: Invalid argument supplied for foreach() in /var/www/schulblog/wp-content/plugins/category-featured-image/lib/class-categoryfeaturedimage.php on line 223” while reading response header from upstream, client: 127.0.0.1, server: 127.0.0.1,
request: “POST /fus/wp-json/wp/v2/posts/4337?_locale=user HTTP/1.0”, upstream: “fastcgi://unix:/var/run/php/php7.4-fpm.sock:”,host: “schulblog.net”, referrer: “https://schulblog.net/fus/wp-admin/post.php?post=4337&action=edit”
I’m not sure if this is critical, but it’s better to be looked at.
Thanks for your support!
Jürgen
]]>Hi,
I plan to display the category featured image on the category page. I would like to know if there is any code that i can call the Category Featured Image? I would like to add it in my template. I have php knowledge.
UPDATE:
I studied your code, I’ll create function to query from termmeta to get the featured_image_id for now.
]]>Hello, im using your plugin and its great. i have a prblem , all seems to be ok in first setup, all worked new image in category was ok, till my rss feed importer didnt import new post, every new post doesent have image and i need to go to categories and set again image to category then image reapear…. and help maybe about this problem? Regards
]]>I have lost my all post featured image after installation and activating this plugin. I have uploaded one featured image for a category. ( I have not checked the checkbox – “Apply category featured image at post”.)
The delete button is not working with images. I have uninstalled this plugin.
]]>Hi,
I need to specify a 200pxx200px size for a Custom Content Type category image in the custom Posts.
Thanks for the Help !
Regards
MG
]]>