trying to do if post meta !=0
I'm trying to do a simple if function on my code but for some reason it just isn't working correctly. I've gone over it several times to see if there is anything I'm missing, but no luck. I'm trying to say my value is 0 then echo nothing if not else the_ratings. Very simple...
?php if( get_post_meta( $post_id, 'ratings_users', true ) === '0' ) {
}else{
the_ratings();
} ?
?php if(!get_post_meta( $post_id, 'ratings_users', true ) !='0' ) {
}else{
the_ratings();
} ?
?php if(get_post_meta( $post_id, 'ratings_users', true ) =='0' ) {
}else{
the_ratings();
} ?
Edit: at this point I've tried 3 different ways to get this stupid thing to output nothing if the value in the custom field is 0 and still it doesn't work correctly.