I'm trying to prevent that the first entry has a certain class in this case the class 'wide'. I call the class from a channel-field called {format}. But i want the use the param orderby="random" in the entries tag.
Now sometimes the first entry with the class 'wide' is still shown, how can i prevent this?
This my code so far..
{exp:channel:entries channel="work" orderby="random" status="open|featured"}
{if count == 1 AND '{format}' != 'wide'}
<div class="item {format} photography">
<div class="item-content" style="background-image:url({beelden limit="1"}{url}{/beelden})"></div>
<div class="item-overlay">
<span class="item-title">{templates}</span>
<span class="item-title">{title}</span>
</div>
</div>
{if:else}
<div class="item {format} photography">
<div class="item-content" style="background-image:url({beelden limit="1"}{url}{/beelden})"></div>
<div class="item-overlay">
<span class="item-title">{templates}</span>
<span class="item-title">{title}</span>
</div>
</div>
{/if}
{/exp:channel:entries}