Open r-brown opened 6 years ago
Will investigate if there is a special CSS class assigned to a featured image by WP core regardless of the theme code. If so, then the goal could be feasable with is_home() and some CSS code within creddit_tracker_thumbnail function.
Made some investigation. Actually it might depend on the theme as well. E.g. in twentyseventeen the caption for the featured image will not be displayed on the starting page but on all other pages. In twentyfourteen the caption will be displayed for the featured image, no matter on which page you are.
Actually the solution is real easy: lets change line 214 in credit-tracker-shortcoes.php like that: if ((bool)$ct_override_caption_thumbnail and !empty($post_thumbnail_id) && !is_front_page()) { Tested and tried on 20+ themes and does the job always.
Now we still need to implement a checkbox on the settings page for turning on/off this feature.
Hi @idea--list thank you for the suggestion. Looks good. Go ahead! 👍
Hi @r-brown , have just sent a pull request.
Hello,
I got this to work for my featured images for individual posts but I realize that in one of my posts boxes on my main page, it shows it under the featured image thumbnails as well.
Is there a way to have the credit captions ONLY show on individual post pages?
URL: https://wordpress.org/support/topic/add-featured-image-credit-but-not-on-main-page/