Dynamic-Featured-Image
Dynamic-Featured-Image copied to clipboard
I've installed the plugin but I have no idea how to call the images
Hi there,
I'm very new to Wordpress in a coding sense. I've installed your Dynamic-Featured-Image plugin as i want to be able to use a different image for a portfolio slider on my website. I have no idea how to update the code to make it do that. Are you able to assist?
@MrJarrad you can find related info in this wiki: https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/Retrieving-data-in-a-theme
Thanks for getting back to me @ankitpokhrel.
Sorry I didn't really explain. I did see the link you provided earlier. What I meant was I have no idea where I should insert the provided code or what code I need to replace it with. I've attached one of my templates in my theme. If you can shed some light on where I would insert the Dynamic Featured image code, it would be extremely helpful.
Thanks for your time and assistance.
Cheers, Jarrad style2.txt
Any advice?
@MrJarrad hey there. I added this code to my single.php file within my theme:
if( class_exists('Dynamic_Featured_Image') ) { global $dynamic_featured_image; $images = $dynamic_featured_image->get_featured_images( get_the_ID() ); foreach( $images as $image ) { echo '<img src="' . $image['full'] . '" />'; } }
I hope that helps!