i found the solution myself! ehe..
<?php
$keyword = “keyword”;
$args = array(
‘post_type’ => ‘attachment’,
‘numberposts’ => -1,
‘post_status’ => null,
‘post_parent’ => null, // any parent
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $post) {
if(trim($post->post_content)==$keyword){
setup_postdata($post);
the_attachment_link($post->ID, false);
}
}
}
?>
if someone can help me make this shorter, please do.. =)