• I want that if a user is logged in he has post his posts will be colored different. Only that user can see that special .css

    Something like this.

    If user is logged in mark his posts with white background else do nothing.
    .type-post, .type-page, .type-attachment, .comments-area, .comment-respond {
    background: #fff;
    }
    • This topic was modified 6 years, 9 months ago by Gustav.
Viewing 1 replies (of 1 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    So what I’d do is write a filter on body_class. In that code, I’d check to see if the viewer is logged in. If so, then I’d check to see if I were viewing a single post and add a class to the body, something like “is_author”. If this is a post archive, I’d do the same for the post_class.

Viewing 1 replies (of 1 total)

The topic ‘Current user posts custom css’ is closed to new replies.