Answers for "wordpress wp_query orderby random"

PHP
0

wordpress wp_query orderby random

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

$pc = new WP_Query( $args );
Posted by: Guest on June-03-2021

Browse Popular Code Answers by Language