I have recently installed Dynamic Featured Image plugin for wordpress. But I do not know how to link images. I’m trying to create me a gallery like this http://www.subcreative.com.au/#work – Scroll down to the projects and you will see .
I have put this code in functions.php
<?php
while ( have_posts() ) : the_post();
if( function_exists('dfi_get_featured_images') ) {
$featuredImages = dfi_get_featured_images();
//Now, loop through the image to display
}
endwhile;
?>
and used this to link the image.
echo ' <a class="fancybox" href="'. dfi_get_featured_images() .'" style="text-align:center">Take a look</a> '; ?>
But when I try to open the image, it becomes “/array”
Im not a wordpress dev but I’ve seen this on the wordpress website that I tried to fix.
so maybe you can try this one.
this works in my case. I’m using DFI 3.1.13
You need to loop throught the returned array and display the image manually. Try this:
try this inside of have posts loop
If full doesn’t work try thumb also.