Without any other context (which means you will likely need to adapt to your specific needs), I would consider using the post_class
filter. Using this filter, you can access the post meta for the current post, and conditionally add a CSS class to the post container.
For example:
function wpse129167_filter_post_class( $classes, $class, $postid ) {
// Get post meta value for fl_status
$fl_status = get_post_meta( $postid, 'fl_status', true );
// If fl_status = sold, add a CSS class
if ( 'sold' == $fl_status ) {
$classes[] = 'fl-status-sold';
}
// Don't forget to return the array
return $classes;
}
add_filter( 'post_class', 'wpse129167_filter_post_class', 10, 3 );
Look at your post markup inside your loop. Look for this:
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post markup will be here
</div>
For posts with a post meta key fl_status
with a value of sold
, that call to <?php post_class(); ?>
will, among the usual classes, output the class fl-status-sold
.
So, you can target this class with your CSS (directly in style.css
, if you wish):
.fl-status-sold #firstimg {
opacity:0.4;
filter:alpha(opacity=40);
}