Random post

Discussion in 'GeoCraft WordPress Theme' started by vizibit, Jan 18, 2013.

  1. vizibit

    vizibit New Member

    Joined:
    Jan 11, 2013
    Messages:
    1
    Likes Received:
    0
    On the main page below the featured slider there is a list of recent add listings, this list is sort by when the listing was added, but i want it to show the listings randomly....is it possible?

    this code...
    wp_reset_query();
    $limit = get_option('posts_per_page');
    $post_type = POST_TYPE;
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts(array(
    'post__not_in' => $sticky,
    'ignore_sticky_posts' => 1,
    'post_type' => $post_type,
    'showposts' => $limit,
    'paged' => $paged

    is used to show the listings, but can i add this code or some other code
    'orderby' => 'rand'
    where should i put it?
     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207

Share This Page