Featured Images on thumbnails grey out
-
Hi,
I am a fan of your plugin and did a little tweaking on the function.php have been using it with my Soledad theme with no problem. But after I update the theme, the feature images thumbnails are grey out.
Somehow, it seems that it is not able to show thumbnails with external featured images urls taken from my last image of my post (it works only when I add the pictures to the WP media gallery. I have forgot how I tweak back then (playing around) and hence, decided to seek help here.
From theme function.php:
/** * Get the featured image size url from post * * @since 3.1 * @developed PenciDesign */ if ( ! function_exists( 'penci_get_featured_image_size' ) ) { function penci_get_featured_image_size( $id, $size = 'full' ) { if ( ! has_post_thumbnail( $id ) ) { return ''; } else { $image_html = get_the_post_thumbnail( $id, $size ); preg_match( '@src="([^"]+)"@', $image_html, $match ); $src = array_pop( $match ); return $src; } } } /** * Get the featured image size url based on featured image full url * * @since 3.1 * @developed PenciDesign */ if ( ! function_exists( 'penci_get_image_size_url' ) ) { function penci_get_image_size_url( $image_url, $size = 'full' ) { global $wpdb; $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url )); $image_id = $attachment[0]; $image_thumb = wp_get_attachment_image_src($image_id, $size); $image_thumb_html = $image_thumb[0]; return $image_thumb_html; } }
Where do I insert the _nelio_url function and change the way it get the image from your nelio metabox instead of wp metabox so that it will just grab the image from the last image of the post?
It works perfectly before so I am sure it will work here too. Hope you can help!
- The topic ‘Featured Images on thumbnails grey out’ is closed to new replies.