Random query with post2post not working
-
Hello,
to display post I am using custom wp query with this arguments:
$args = array(
‘post_type’ => ‘network’,
‘connected_type’ => ‘customposts1_to_posts’,
‘connected_to’ => ‘any’,
‘connected_query’ => array(
‘category_name’ => ‘category-1’,
),
‘nopaging’ => true,
);
connection is:
from customposts1, to posts
What I am trying to accomplish, is to get random query of specific number of posts (so after refresh they will be in different order and displayed maybe different posts.
every other type of orderby is working ok, except orderby=”rand”
Is there any way of making this work?
change the query arguments?
thanks
- The topic ‘Random query with post2post not working’ is closed to new replies.