Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
ebarrosoMemberHi @Steve, thanks for your reply, it helps me so much.
@Jason, your method is useful, i will do that next time.
ebarrosoMemberSolved:
It was wrong:
$image_ids = get_post_meta($post_id, 'sec_img', true);The correct form is:
$image_ids = get_post_meta($post->ID, 'sec_img', true);So, my final code, to show the second image with Piklist, is:
<?php $image_ids = get_post_meta($post->ID, 'sec_img'); foreach ($image_ids as $image) { $myupload = get_post_meta($image); echo '<img src="' . wp_get_attachment_url($image) . '"/>'; } ?>Thanks for your help!!
ebarrosoMemberSorry, in my first post of this Topic, i wrote “img_sec” and then “sec_img”, I have fixed, but I get the same error.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)