WP_Query + random

Please try this:

$args = array(
    'category_name'  => 'cat1',
    'posts_per_page' => 5,
    'orderby'        => 'rand',
);

$pc = new WP_Query( $args ); 

where 'rand' should give you a random order of your posts.

For more info check out the Codex on WP_Query order parameters here.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)