I have successfully setup a loop that will make the ‘firstpost’ of the page it’s own div with category and all others will have an id of ‘post’. I followed the advice from someone here who had a link to their own blog explaining their idea further: .
This blog is a video blog, with the ‘firstpost’ as the video being watched and a (hopefully) list of thumbnail’s for all the other videos below that. My issue now is that I can successfully style the 2 divs on their own, but I need to separate the content between the two. They both use the same loop and I need the ‘firstpost’ to have no thumbnail and the ‘post’ div to only have a thumbnail and be an excerpt so it doesn’t embed the full video.
I thought something like an if div id=’firstpost’ then (this is where the story content would be) followed by an else if div id=’post’ (and it’s own content here). I can’t find a way in php to even look for an html div id, so there must be some other way to do this or there’s something I’m missing. I’ve tried a few different approaches to this with all of them giving me a blank screen or an endless loop. Hope that long rant makes some kind of sense. Just let me know if anything needs further clarification. I’ll include my current code here so you can see exactly what’s going on. Thank you for any help you can offer, my brain is officially taxed on this one.
I added some comments within the code snippet so you can see what I’m wanting to do.
- The topic ‘Loop with 2 divs (firstpost and post), can't separate thumbnails’ is closed to new replies.