the_meta is deprecated and it's told to replace it with get_post_meta. I'm using since long time this function for custom fields without styles: //the_meta function without styles:
function mymeta() {
if ( $keys = get_post_custom_keys() ) {
foreach ( (array) $keys as $key ) {
$keyt = trim($key);
if ( is_protected_meta( $keyt, 'post' ) )
continue;
$values = array_map('trim', get_post_custom_values($key));
$value = implode(', ', $values);
echo apply_filters('the_meta_key', "$key $value \n", $key, $value);
}
};
But I don't know how to replace it with get_post_meta (). I was using the mymeta function to list all the custom fields of a post for special purposes. And get_post_meta() retrieve just the value of a single custom field of a post.
The code where I use than "mymeta ()":
<?php $postslist = get_posts('numberposts=22&category_name=gigs&post_status=future&order=ASC&orderby=date'); foreach ($postslist as $post) : setup_postdata($post); ?><div> <h2 style=""><?php the_time('l \&\n\b\s\p\; j. F \'y');?><?php mymeta();?></h2> <h1><br /><?php the_title(); ?><br /></h1>
Any help welcome. thanx in advance & cheers