I am trying to insert the archive.php code into a php enabled widget. I removed the header, sidebar, footer calls. The code works great, it shows everything correctly but the image. On the archive page it works fine, but in the widget, it shows the same image(thumbnail, featured image) for every post..
archive code attached
it has an if/else for how to display image, it displays the image from line 72 when used in the widget, I am guessing it has having trouble getting the link for the featured image or image from the post to use for the thumbnail.
Why would it work when used in the archive.php, and not in the widget, everything works in the widget but the featured image. Could it need a function from another script?
Thanks for any help -Pat