Dynamic-Featured-Image icon indicating copy to clipboard operation
Dynamic-Featured-Image copied to clipboard

I've installed the plugin but I have no idea how to call the images

Open MrJarrad opened this issue 4 years ago • 4 comments

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 avatar Jan 16 '20 07:01 MrJarrad

@MrJarrad you can find related info in this wiki: https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/Retrieving-data-in-a-theme

ankitpokhrel avatar Jan 16 '20 21:01 ankitpokhrel

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

MrJarrad avatar Jan 17 '20 02:01 MrJarrad

Any advice?

MrJarrad avatar Jan 23 '20 01:01 MrJarrad

@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!

shpemu avatar Aug 15 '23 13:08 shpemu