Credit not Display for featured images.
-
Hi Have successfully install the plugin, now Credit not Display for featured images. Please refer screen shot for settings of plugins http://prnt.sc/e0qpt4
Thanks
-
The behavior of featured images depend on how your theme uses them. If the theme does not use the
post_thumbnail_htmlfilter hook, you have to integrate the credit into your templates manually.@himanshu_ag Please check if your theme uses the
the_post_thumbnailfunction to display post thumbnails. If not, you will have to integrate media credits into your templates manually (the API is described on the plugin website).@himanshu_ag Have you been able to resolve the issue?
I assume the issue has been resolved.
Hey, post credit is work … still Credit not Display for featured images. on my site Request to check
Sorry, @himanshu_ag, I didn’t get that. Have you had a look at your theme’s featured image implementation? Does it use function
the_post_thumbnailor not?Hi have checked wp-includes / post-thumbnail-template.php did not get properly Request to check below code
/** * Display the post thumbnail. * * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size * is registered, which differs from the 'thumbnail' image size managed via the * Settings > Media screen. * * When using the_post_thumbnail() or related functions, the 'post-thumbnail' image * size is used by default, though a different size can be specified instead as needed. * * @since 2.9.0 * * @see get_the_post_thumbnail() * * @param string|array $size Optional. Image size to use. Accepts any valid image size, or * an array of width and height values in pixels (in that order). * Default 'post-thumbnail'. * @param string|array $attr Optional. Query string or array of attributes. Default empty. */ function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) { echo get_the_post_thumbnail( null, $size, $attr ); }and assit
That’s the function in WordPress core. You need to look at your theme’s files.
I think this code will help you `if ( ! function_exists( ‘jobcareer_get_post_img’ ) ) {
function jobcareer_get_post_img( $post_id, $width, $height ) {
$image_id = get_post_thumbnail_id( $post_id );
$image_url = wp_get_attachment_image_src( $image_id, array( $width, $height ), true );
if ( $image_url[1] == $width and $image_url[2] == $height ) {
return get_the_post_thumbnail( $post_id, array( $width, $height ) );
} else {
return get_the_post_thumbnail( $post_id, “full” );`-
This reply was modified 9 years ago by
Himanshu.
And is that function
jobcareer_get_post_imgactually used? If so, please point me the images on an example page that are the output of that function. Also, look whether and where that function is used, the code may be stripping out things from the returned HTML markup.@himanshu_ag I’m sorry, but I’m closing this thread. If you are not “fluent” yourself, you need to hire a PHP developer to do the necessary theme customizations. This goes way beyond the remit of this support forum.
-
This reply was modified 9 years ago by
The topic ‘Credit not Display for featured images.’ is closed to new replies.