Home › Forums › Front-end Issues › Specific-size image from another page › Reply To: Specific-size image from another page
Hey there,
Thanks for your reply, I actually just figured this out before I read your answer…total rookie mistake. In ACF I chose Image URL
instead of Image Array
. I was thinking because it was a single field there would be no “array”, as there is only one item…but that literally just passed the URL through and didn’t give me all the options that the array provides.
So, the code didn’t change:
<?php
$page_title = get_page_by_title( 'How it Works' );
$page_image = get_field('title', $page_title->ID);
?>
<img src="<?php echo $page_image['sizes']['thumbnail']; ?>" />
Thanks,
Josh
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.