• enricoeur

    (@enricoeur)


    I want to modify this function and create one for identify a particular META KEY “small_picture” and when called return the link to image specified by me…

    PLEASE MODIFY IT ….IF YOU CAN

    thanks in advance !

    function the_meta() {
    global $id, $post_meta_cache;

    if ( $keys = get_post_custom_keys() ) {
    echo “<ul class=’post-meta’>\n”;
    foreach ( $keys as $key ) {
    $values = array_map(‘trim’, get_post_custom_values($key));
    $value = implode($values,’, ‘);
    echo “<span class=’post-meta-key’>$key:</span> $value\n”;
    }
    echo “\n”;
    }
    }

Viewing 1 replies (of 1 total)
  • Kafkaesqui

    (@kafkaesqui)

    Try this:

    <?php $small_picture = post_custom('small_picture'); ?>

    Then where you want to display your custom value:

    <?php echo $small_picture; ?>

    Note this is best used when only one ‘small_picture’ custom key exists on a post. Multiples are concatenated into a single string.

Viewing 1 replies (of 1 total)
  • The topic ‘An additional Meta Key Function — Please Help Me’ is closed to new replies.