Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress wp_query orderby random

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

$pc = new WP_Query( $args ); 
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #wordpress #orderby #random
ADD COMMENT
Topic
Name
4+7 =