How to retrieve an img src value from an un-loaded wordpress post?

BuyAbilifyST

New Member
What I'm trying to do here is basically make the background of a loop post's div background-image. Pseudo code looks something like this:\[code\] if this.post has an img tag { store the img tag's src into a var, then use that img src var as the background-image of the div which holds the permalink to the post }\[/code\]Does this make sense? I'm thinking I'll have to retrieve the src from within the WPDB, but I really have no idea how to not only get that data from the WPDB, but also get it into a var that can then be used inside the div as the background-image...I know, a pretty tall order and probably a big learning curve for me. But That's how we learn right! :)Thanks in advance, anyone.
 
Back
Top