I'm building a fairly large site that has a "most recent posts" section on the main page.
So far, I've been using the wp_get_archives function with good success to bring up a list of the most recent posts. However, I have different categories for different topics of posts, and I want to be able to style each post listed depending on what category it is from.
Is this easily done with wp_get_archives? Can I find a way to identify and style each post depending on category?
wp_get_archives only displays a list of links to post - not the actual posts themselves. Are you talking about styling each one of these links differently? If so, that not possible with wp_get_archives.
Yeah, sorry, that's what I want to do. Style each link differently depending on category.
If this isn't possible with wp_get_archives, is there a similar function that would provide for this?
Not a single function, no., You need to build a script that used custom queries to grab the relevant group of posts by date, then in a loop, grab the first category assigned to each post and add the category slug as a class to the final generated link.
Not trying to be needy, but I'm not yet a pro at PHP. Any chance you could flesh out what you're proposing here?