Get URl of second attached image
-
Hi, i’m trying to flip the image on hover for posts on archivepage.
I’ve created an li with a background image like this:
if (has_post_thumbnail( get_the_ID() )) echo '<li class="shopimage" style="height:240px; background-image:url('.$image.')" />
Now I want to have the second image out of the post gallery.
I changing the image via CSS but I don’t know how to get the URL of the second image dynamicly?!li:hover.shopimage {background-image:url("WHAT TO WRITE HERE???")
I tried several versions I can’t remeber them all.
So the question is: how to get the URL of a specific image attached to post
Thanks in advance
- The topic ‘Get URl of second attached image’ is closed to new replies.