Apologies if this has been covered however if it has been I had trouble finding it.
I am putting together a blog site which I plan to convert into a wordpress theme. For each blog post I have a full screen image link on the landing page which takes you the particular blog post. The code for each post is identical.
HTML
<a href="#" ><div class="post"></div></a>
CSS
.post{
width: 100%;
height: 75vh;
background-image: url(../img/5.jpg);
background-position: center 0px;
background-repeat: repeat-y;
background-attachment: fixed;
margin-bottom: 100px;
position: relative;
}
As I wish to convert this into a wordpress theme I need a way for the code to be replicated with a different background-image relating to each new post. Is their a way to do this using PHP or javascript?