Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Meta query – under 5 starts rating

Retrieve only items rated under 5 stars.

$meta_query = array(
	array(
		'key'     => 'rating',
		'value'   => '5',
		'compare' => '<',
		'type'    => 'NUMERIC',
	),
);