Home › Forums › General Issues › Use select field for the_post_thumbnail › Reply To: Use select field for the_post_thumbnail
Close, but change:
the_post_thumbnail( '$size' );
to
the_post_thumbnail( $size );
Please be aware, that you have placed the $size = get_field('image_size');
OUTSIDE of your $myposts loop, so this value is not coming from the post itself, but from what ever the template file is querying.
Thanks
E
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.