if your theme is using post_class()
in the div that contains the post, you can add an author class to it by adding this code to functions.php of your theme:
//add an author class to post_class() by filter//
function post_author_id_class($classes) {
global $post;
$classes[] = 'author-'.get_the_author_meta('user_nicename');
return $classes;
}
add_filter('post_class', 'post_author_id_class');
and then, for instance, style with:
.author-admin { background: #123456; }
if your theme does not use post_class()
, you might need to edit the template files where you want to show this different background (index.php, single.php, ..) and find the div that surrounds the posts;
simple example:
<div class="post" id="post-<?php the_ID(); ?>">
to include an author class, you could change it to:
<div class="post<?php echo ' author-' . get_the_author_meta('user_nicename'); ?>" id="post-<?php the_ID(); ?>">
details depend on your theme; for more help, a link to your site is needed.