This project is read-only.

Different layout for the most recent post

Topics: Controls, Themes
Mar 5, 2009 at 7:17 PM
Has anyone done any layout or theme that will make the most recent post look different than all the other posts?

Seems that it must be possible in WordPress as my client cites this site as doing it:

Mar 8, 2009 at 8:42 PM
It is possible, but it's not easy (well for me it wasn't!) and i'm not sure how reliable it is either.

Here is a link to my work in progress. It's a new them i'm creating (so ignore all the content and stupid comments which were all tests) based on a magazine style blog. The problem I had is I wanted a homepage that looks different to the rest of the blog (hence the magazine style). I created a routine in visual basic which I won't post here because i'm new to programming and there are probably far better ways to do it. The routine manipulates the raw text string of the blog post and removes any pictures or youtube videos. It then stores two strings, one containing the content and another containing the picture. I then adapted the Singlepost widget I found on this site to create a 'leadpost' and 'recentpost' object. If you look at the homepage you will note the first post shows the picture to the side and the recent posts have left out any attaching pictures etc. When I write a new post I don't have to worry about anything as the code will sort everything out for me. I was chuffed with what I'd done but have now decided not to go ahead with the blog so it was all a bit of a waste. Hopefully though this may give you some inspiration as proof it can be done if you tinker about with it.