Used this some time ago, but should work:
<?php
//exclude the "_*" custom fields and "enclosure" when displaying in loop
if ( $keys = get_post_custom_keys() ) {
echo "<ul class='post-meta'>\n";
foreach ( (array) $keys as $key ) {
$keyt = trim($key);
if ( '_' == $keyt{0} || 'enclosure' == $keyt )
continue;
$values = array_map('trim', get_post_custom_values($key));
$value = implode($values,', ');
echo apply_filters('the_meta_key', "
<li><span class='post-meta-key'>$key:</span> $value</li>
\n", $key, $value);
}
echo "\n";
}
?>
Thread Starter
suldan
(@suldan)
you just forgot to close the ul :o)
<?php
//exclude the "_*" custom fields and "enclosure" when displaying in loop
if ( $keys = get_post_custom_keys() ) {
echo "<ul class='post-meta'>\n";
foreach ( (array) $keys as $key ) {
$keyt = trim($key);
if ( '_' == $keyt{0} || 'enclosure' == $keyt )
continue;
$values = array_map('trim', get_post_custom_values($key));
$value = implode($values,', ');
echo apply_filters('the_meta_key', "
<li><span class='post-meta-key'>$key:</span> $value</li>
\n", $key, $value);
}
echo "</ul>\n";
}
?>
Thanks for the fix suldan.
Halla.
Seems I do have the same problem. I’m using audio player plugin. WordPress creates a enclosure for the .mp3 file that I’m hosting on my domain.
The MAIN problem is that everyone who is subscribed to my feed will receive in mail, at the end, something like: ” This posting includes an audio/video/photo media file: Download Now ” . Under Download Now it’s my link and that’s not good at all ! I don’t want to experience legallity issues with artists/labels.
So all I want is to remove that line from Feeds… thing that might be possible if the enclosure is removed.
Now I can see that code above.. where should I post it.. what should I do in order to have it workin’ ?
I’m waiting for an answer asap.
Thanks in advance.