Sorry I’m not very good with code… you mean here?
<?php
$args = array(
'category_name' => 'featured small',
'post_type' => 'post',
'posts_per_page' => 30,
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
);
query_posts($args);
$x = 0;
while (have_posts()) : the_post(); ?>
<?php if($x == 0) { ?>
<div class="featured_box first">
<?php } elseif($x == 2) { ?>
<div class="featured_box last">
<?php } else { ?>
<div class="featured_box">
<?php } ?>
[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
Well that’s a custom query, yes but it’s not going to create a random order.
Ahhh, that’s the code I’m using at the moment provided by the theme
In that case, try replacing the query parameters with:
$args = array(
'category_name' => 'featured small',
'post_type' => 'post',
'posts_per_page' => 30,
'orderby' => 'rand',
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
);
Tried but nope.
<?php
$args = array(
'category_name' => 'featured small',
'post_type' => 'post',
'posts_per_page' => 30,
'orderby' => 'rand',
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
);
query_posts($args);
$x = 0;
while (have_posts()) : the_post(); ?>
<?php if($x == 0) { ?>
<div class="featured_box first">
<?php } elseif($x == 2) { ?>
<div class="featured_box last">
<?php } else { ?>
<div class="featured_box">
<?php } ?>
That should work but right now, it seems your site is down.
It was that code that did that. Fixed by deleting orderby' => 'rand',