puckettgw
Forum Replies Created
-
Forum: Plugins
In reply to: [Recent Posts Slider] Error and Missing PhotosSame issue —
I did some debugging and it appears that in the following code:
}elseif ( $slider_content == 1 ){ $output .= '<p class="slider-content-img">'; if( !empty($post_details[$p]['post_first_img']['0']) ){ $rps_img_src_path = $post_details[$p]['post_first_img']['0']; if(!empty($rps_img_src_path)){ $output .= '<a href="'.$post_details[$p]['post_permalink'].'"><center><img src="'.$rps_img_src_path.'" alt="'.__($post_details[$p]['post_title'], 'rps').'" /></center></a>'; } }Around line 498 in recent-posts-slider.php is malfunctioning.
I checked via print_r and it looks like new posts are no longer setting post_first_img .. perhaps this behavior changed somehow in a recent WP update?
Old posts still have the key set properly and still display images, but new ones do not have any value stored for that key.
I tried ‘hacking’ it by adding
else{ $feat_image=wp_get_attachment_url( get_post_thumbnail_id($post_details[$p]['post_ID']) ); $output .= '<a href="'.$post_details[$p]['post_permalink'].'"><center><img src="'.$feat_image.'" alt="'.__($post_details[$p]['post_title'], 'rps').'" /></center></a>'; }after that statement, however in addition to not properly retrieving the img src in the line of code above, the one that I wrote previously that worked still didn’t properly scale images (since it’s just using the featured image which isn’t really that great of an idea imo.)
Hope this helps — please try to fix this asap? 😀