Question

I'm want to use the Recent Photos Plugin in my sidebar to show the last uploaded photos but instead of linking them to the bigger versions of the images I want to link to the post they were used in. Can somebody tell me how I get the link of the last post an image was used in?

Thanks, udo

Was it helpful?

Solution

If you do a sidebar based on the posts and display the image you can display the image from a post then have it link to the permalink based on the post. If you do it based on the images like you are doing, there is no identifier that tells wordpress whether or not the image is part of any particular post. So in turn if you wanted, you can set a condition to pull posts and put it in a array and have it cross reference and descend the order by the date of upload per image.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top