You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
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/
The text was updated successfully, but these errors were encountered: