• Resolved DhanyaAbraham

    (@dhanyaabraham)


    Hi

    I am using your plugin.But I need some custom settings , I have 3 buttons below each post, if I click on the first button ,1st featured image should come, then 2nd button 2nd image and so on. Shall I know is it possible with this plugin?

    How to call individual images using this function?

    <?php if( function_exists(‘dfi_get_featured_images’) ) {
    $featuredImages = dfi_get_featured_images();?>

    http://wordpress.org/plugins/dynamic-featured-image/

Viewing 1 replies (of 1 total)
  • Plugin Author Ankit Pokhrel

    (@ankitpokhrel)

    Hi,

    Thank you for checking out the plugin. The data returned by the function is in the following format:

    array
      0 =>
        array
          'thumb' => string 'http://your_site/upload_path/yourSelectedImage.jpg' (length=50)
          'full' => string 'http://your_site/upload_path/yourSelectedImage_fullSize.jpg' (length=69)
          'attachment_id' => string '56' (length=2)
      1 =>
        array
          'thumb' => string 'http://your_site/upload_path/yourSelectedImage.jpg' (length=50)
          'full' => string 'http://your_site/upload_path/yourSelectedImage_fullSize.jpg' (length=69)
          'attachment_id' => string '57' (length=2)
      2 => ...

    So if you like to get the images individually you can do something like this:

    $returnedArray[0]; //will give you the first image
    $returnedArray[1]; //will give you the second image
    $returnedArray[2]; //will give you the third image

    and so on

    Thanks,
    Ankit

Viewing 1 replies (of 1 total)
  • The topic ‘what is the code for individual featured images?’ is closed to new replies.