تشکر با کدی که دادین یذره خطا داد اما با کد زیر که یذره تغییرات دادم کاملا رفع شد <?php function aldenta_get_post_image($size = 'thumbnail') { global $post; $photos = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ); if ($photos) { $photo = array_shift($photos); $default_attr = array( 'alt' => trim(strip_tags( $post->post_title )), 'title' => trim(strip_tags( $post->post_title )), ); return wp_get_attachment_image($