Arkadaşlar aşağıdaki kod ile description kusmını çekebiliyorum ama tamamını alıyor. Bunu sınırlandırabilir miyim?
<head> <meta name="description" content="<?php echo get_post_meta($post->ID, 'desc', true); ?>" />
</head> Fuctions.php function be_attachment_field_credit( $form_fields, $post ) {
$form_fields['description'] = array(
'label' => 'Description',
'input' => 'text',
'value' => get_post_meta( $post->ID, 'desc', true ),
);
return $form_fields;
function be_attachment_field_credit_save( $post, $attachment ) {
if( isset( $attachment['description] ) )
update_post_meta( $post['ID'], 'desc', $attachment['description'] );
}
return $post;
}
add_filter( 'attachment_fields_to_save', 'be_attachment_field_credit_save', 10, 2 );