Wrong ID for individual post
-
Hello!
I have a problem when I try to set a custom resolution on thumbnails for Youtube. It seems like this plugin just looks at the last ID and applies that to all instead of looping through all individual post.
It seems like $post always is the same, can that be right?
I think the problem starts in frontend => class-youtube.php.
function thumbnailquality() { global $post; $thumbnailquality_default = '0'; $thumbnailquality = $thumbnailquality_default; if (!isset($post->ID)) { $id = null; } else { $id = $post->ID; } // When the individual status for a page/post is '0', all the other setting don't matter. if ( ( get_post_meta( $id, 'lazyload_thumbnail_quality', true ) && get_post_meta( $id, 'lazyload_thumbnail_quality', true ) === '0' ) ) { return $thumbnailquality; } elseif ( ( get_post_meta( $id, 'lazyload_thumbnail_quality', true ) && get_post_meta( $id, 'lazyload_thumbnail_quality', true ) === 'max' ) || ( ( get_post_meta( $id, 'lazyload_thumbnail_quality', true ) !== '0' ) && ( get_option('lly_opt_thumbnail_quality') === 'max' ) ) ) { $thumbnailquality = 'maxresdefault'; } return $thumbnailquality; }
Thank you in advanced!
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Wrong ID for individual post’ is closed to new replies.