Is your post ID with 6 contains a featured image?
Yes,
– i´m using the way [ratings] (instead of <?php ……)
– in every point i´ve put [ratings] there is an image
https://artandscores.com/art-music
https://artandscores.com/divertimento-symphonic-band
– could be possible to manage this issue …. ????? … i´m thinking something like :
[ratings id”xx” <image src=”domain/uploads/images/mypicture.jpg>]
Thanks.
…. or a way to inject it into a child custom.php
Unfortunately no, you can’t inject it.
You probably have to debug it yourself, I can give you some clues, the image is detected at https://github.com/lesterchan/wp-postratings/blob/master/wp-postratings.php#L1169-L1178. So you can do a var_dump() along the way to see where it fails.
For starters you can try replace this two lines https://github.com/lesterchan/wp-postratings/blob/master/wp-postratings.php#L1169-L1170
if( has_post_thumbnail() ) {
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( null ) );
With
if( has_post_thumbnail( $post ) ) {
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ) );
-
This reply was modified 9 years, 5 months ago by
Lester Chan.
Sorry, i was wrong, your “if” is doing very well
if( has_post_thumbnail() ) { $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( null ) );
My error was:
– I´m using one main image into every single post but …
– i was deactivated features-image, cause i don´t like positioning at top of post, and also cause my inner image is the same as feature image.
What i´ve done:
1) I´ve activated feature image —-> wp-postrating search and take it correctly ¡¡¡
2) I´ve hide that using CSS
Thank you, and very grateful for your help.