functions.php içersinde Şu An Kullanılan Resmi Çağırma Kodu:
echo '/images/image-pending.gif';
functions.php Kodlarının Tamamı:
if ( function_exists('register_sidebar') )
register_sidebar();
function exclude_category($query) {
if ( $query->is_home ) {
$query->set('cat', '-16');
}
return $query;
}
add_filter('pre_get_posts', 'exclude_category');
# Get image attachment (sizes: thumbnail, medium, full)
function get_thumbnail($postid=0, $size='full') {
if ($postid<1)
$postid = get_the_ID();
$thumb = get_post_meta($postid, "thumb", TRUE); // Declare the custom field for the image
if ($thumb != null or $thumb != '') {
echo $thumb;
}
elseif ($images = get_children(array(
'post_parent' => $postid,
'post_type' => 'attachment',
'numberposts' => '1',
'post_mime_type' => 'image', )))
foreach($images as $image) {
$thumbnail=wp_get_attachment_image_src($image->ID, $size);
?>
}
else {
echo get_bloginfo ( 'stylesheet_directory' );
echo '/images/image-pending.gif';
}
}