Displaying content based on the current time
You are repeating a lot of HTML, which I guess you know could be condensed down, you can also make use of elseif this way it will execute the first TRUE statement and skip the rest.

If there are no matches, for breakfast, lunch, dinner we can assume it must be late night, as there are no more hours left in the day. As this is the case we can just } else { for the last statement.

I have added a check for $row_count as we can never guarantee there will be results returned

&lt;?php

date_default_timezone_set("Europe/London");

$currentTime = date('Hi');
$breakfastStart = "0200";
$breakfastEnd = "1129";

$lunchStart = "1130";
$lunchEnd = "1559";

$dinnerStart = "1600";
$dinnerEnd = "2129";

$lateStart = "2130";
$lateEnd = "0159";

// set up your variables
$rows = $field_key = $field_title = false;

// is it breakfast time?
if( $currentTime &gt;= $breakfastStart &amp;&amp; $currentTime &lt;= $breakfastEnd )
{

    // if it is, set the field key and title
    $field_key = 'breakfast';
    $field_title = 'Breakfast';

    // if not, is it lunch time?
} elseif( $currentTime &gt;= $lunchStart &amp;&amp; $currentTime &lt;= $lunchEnd )
{

    $field_key = 'lunch';
    $field_title = 'Lunch';

    // if not, is it dinner time?
} elseif( $currentTime &gt;= $dinnerStart &amp;&amp; $currentTime &lt;= $dinnerEnd )
{

    $field_key = 'dinner';
    $field_title = 'Dinner';

    // if not, lets assume its late night
} else {

    $field_key = 'late_night';
    $field_title = 'Late Night';

}

$rows = get_field( $field_key , 41190);
$row_count = count($rows);
$i = rand(0, $row_count - 1);

// if we have some rows..
if( $row_count )
{
?&gt;
    &lt;h4 class="ribbon"&gt;&lt;?=$field_title?&gt;&lt;/h4&gt;
    &lt;h1&gt;
        &lt;?php echo $rows[ $i ]['dish_name']; ?&gt;
    &lt;/h1&gt;
    &lt;p&gt;
       &lt;?php echo $rows[ $i ]['dish_description'];  ?&gt;
    &lt;/p&gt;
    &lt;h3&gt;
        Served&lt;span&gt;&lt;?php echo $rows[ $i ]['time_served'];  ?&gt;&lt;/span&gt;
    &lt;/h3&gt;

&lt;?php
}