CSS For Specific Date Posts

Community Forums Forums Design Tips and Tricks CSS For Specific Date Posts

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  RonnyMac 1 year, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8967

    RonnyMac
    Participant
    Post count: 61

    I want to apply unique CSS to a group of posts from a specific date (or, in the alternative, the most recent day’s posts). In this particular case, the posts are grouped by date. One date, several posts. Then, another date, and several more posts for that date. Simply put, I need to remove the date for the most recent posts, but keep the date for other posts.

     

    Any ideas?


    #15087

    SoZo
    Moderator
    Post count: 1573

    You could put them in a category then remove the date with a body class


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #15112

    RonnyMac
    Participant
    Post count: 61

    Just found a snippet of code for functions.php which adds a class to the first post, when then is used to hide the date for the first post. WP also has a date function which provides a single date for multiple posts on the same day, and the first post class limits the date to one for all the posts. Perfect.


Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.