Jump to content

Archived

This topic is now archived and is closed to further replies.

Aires

Advanced custom fields and images in Nextbox

Recommended Posts

Aires

I was wondering if anyone was able to get images to show up  in nextbox using ACF.

I have tried every thing it seems.

 

I can get the arrary and id to show up but no actual image.

 

The ACF docs use the php tags alot in order to get the image

 

This how they say to use it....

 



<?php

$image = get_field('image');

if( !empty($image) ): ?>


    <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />

<?php endif; ?>

 

no luck on my end.

 

~Aires


ndTgvai.jpg

Visit iheartpagelines.com for the latest tutorials on PageLines related products.

 

Share this post


Link to post
Share on other sites
Aires
After taking a break ...I realized that it would be easier to just call the featured image from wp.

So that is currently working but I would still like some info getting the image field to display more than just the array, Id or link

Thank you


Sent from my iPhone using Tapatalk

ndTgvai.jpg

Visit iheartpagelines.com for the latest tutorials on PageLines related products.

 

Share this post


Link to post
Share on other sites
Danny

You will want to use a hook instead of the NextBox as you can not include PHP opening/closing tags i.e. <?php or ?> 


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Aires

Thanks,

 

I have been meaning to go through that course from Treehouse but I keep putting it off. 

 

I guess should make sometime to wrap my head around it wp hooks


ndTgvai.jpg

Visit iheartpagelines.com for the latest tutorials on PageLines related products.

 

Share this post


Link to post
Share on other sites

×