Home › Forums › Front-end Issues › Outputting custom image size › Reply To: Outputting custom image size
Pirondini
Thanks for the help! Your time is much appreciated.
I’m still getting nothing returned in the src=”” field of the image.
I have the image field in question set up as a set up as a repeater field. It’s a child of the main group called ‘activity_slider’ with the image field called ‘photo’. So,
My code reads like this:
$attachment_id = get_sub_field('photo');
// the name of the sub field. Also tried without 'sub'.
$custom_thumb = wp_get_attachment_image_src( $attachment_id,"slide-thumb" );
// this is the name of the thumbnail size in functions.php
<img src="<?php echo $custom_feature[0]; ?>" />
Nothing is returned. Tried using $custom_thumb too, but no avail.
This is what you said to do right?
Thanks again. Martin.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.