Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: File upload images not showing #9004
    jeanne
    Participant

    Hi!

    This one:

    piklist(‘field’, array(
    ‘type’ => ‘file’
    ,’field’ => ‘my_upload_field’
    ,’scope’ => ‘post_meta’
    ,’label’ => ‘Media Uploader’
    ,’options’ => array(
    ‘modal_title’ => __(‘Add File(s)’,’piklist’)
    ,’button’ => __(‘Add Images’,’piklist’)
    )
    ));

    $image_id = get_post_thumbnail_id();
    $cover = wp_get_attachment_image_src($image_id, ‘_thumbnail_id’);
    $cover150 = str_replace(“.jpg”, “-150×150.jpg”, $cover[0]);

    $favourite_artist = get_post_meta($post->ID, ‘fav_artist_name’, true);
    $favourite_album = get_post_meta($post->ID, ‘fav_album_name’, true);
    $fav_album_artist = get_post_meta($post->ID, ‘fav_album_artist’, true);

    The images uploaded through this uploader does not show on the frontpage. The images appear to be pulled in as $cover[1] and $cover[2] :

    if (!empty($favourite_artist)) {
    echo ‘<div class=”favourite-artist”><h4>MY FAVOURITE ARTIST</h4><div>’ . $favourite_artist . ‘</div></div>’;
    }

    if (!empty($favourite_album )) {
    echo ‘<div class=”favourite-album”><h4>MY FAVOURITE ALBUM</h4><div>’ . get_post_meta($post->ID, ‘fav_album_name’, true) . ‘<p>’ . $fav_album_artist . ‘</p></div>
    </div>’;
    }

    Thanks for looking into this! Much appreciated!

Viewing 1 post (of 1 total)