You need a custom query. codex ref
For instance,
$args = array(
'orderby' => 'rand',
'posts_per_page' => 20,
);
$query = new WP_Query( $args );
this query pick 20 random items. If you go above link, you can see more examples. I hope this will help you.
Related Posts:
- visually sort ordering “custom post types” for end users
- Custom Table Column Sortable by Taxonomy Query
- How do I allow users to sort posts? [duplicate]
- Sorting results from JSON-API on custom fields
- Sort users in get_users() in custom order
- Sort by custom field value
- How to sort posts with the first 2 or 3 by latest, and the rest is random?
- Get “wp_get_nav_menu_items” to sort alphabetically [duplicate]
- Ascending sort order for monthly & category view, i.e. ?m=201204, ?cat=4
- Adding Sorting to Website?
- Sorting by tag or category
- get_terms orderby name as numbers
- Creating a category page by alphabet
- Sorting get_post_ancestors array
- wordpress custom_meta ordering of timestamps
- Multi-level ordering in WordPress
- Sorting for custom column in WordPress admin post table
- Help alphabetically sorting $terms from get terms(‘wpsc_product_category’
- Vertical alphabetically post columns
- Advanced custom fields sort repeater by date
- Displaying posts sorting by a custom criterion
- Sorting custom post type by usermeta
- Sort posts by meta key that is serialised with other meta keys
- orderby field – list of available options?
- User Query sort on custom field then name
- WP Query sort by meta value
- Best Practices for a Completely Customizable Homepage – without plugins
- Sorting posts by custom field value
- How do I create a sort capability by Title, Category, Author, Date?
- How to avoid duplicating same meta_value?
- Sorting/Filter posts from front-end in WordPress blog
- ‘sort_column’ => ‘menu_order’ not working
- Sort scheduled posts in ascending order by default
- How to sort by number
- inner foreach loop sorting
- Sortby parameter to sort users
- Update meta_key value for a page
- Sort my event calendar by date
- Table Sorter sort by span title?
- make two custom columns sortables
- How to display remaining post ( in post__in ) if posts are less then post per page?
- ACF pro: Group teaser by datepicker year and display custom sub fields [closed]
- Sorting in WP_List_Table class
- Sort an array with an ACF meta key
- display wordpress user who published a pending post of another user
- Static front page and orderby
- Advanced sorting of content in wordpress [closed]
- Sort posts by first content letter
- Grouping posts starting with same letter
- Getshopped (WP-e-commerce): show all protucts on one admin page for drag-and-drop ordering [closed]
- List CPT by menu_order with children right after parent
- Multidimensional array sort?
- How can users sort multiple pages?
- How do i Sort my Posts
- How to resort my id in wordpress?
- Sorting search results by taxonomy terms
- Custom Post Type, WP_Query and ‘orderby’
- How to Group Posts by the First Letter or Number?
- Custom order of terms for custom taxonomy in admin and website
- Order posts by meta_value even if meta_key is not filled
- What is the most efficient way to search users by their display name?
- Alphabetical sorting of custom post type – one letter per page
- WordPress Menu Disappears when $query->query_vars[‘meta_key’] is set
- sort events based on event date custom field
- Sorting Posts Via Custom Taxonomy Values Using Checkboxes?
- How to make orderby ‘meta_value_num’ OPTIONAL?
- Custom-post-type-archive: posts sorted/filtered by year?
- Sort list of WordPress Page under tag when is_tag() called
- Sort Posts by Multiple Meta Values [duplicate]
- Admin multiple column sorting
- How to redefine the sorting of product categories by menu_order?
- Sorting category products not working
- WP_query sorting can’t sort danish letters (æ, ø, å)
- Custom Sortable Meta Boxes
- How to display posts via custom taxonomy terms using checkboxes?
- Sort WP_Query with numeric custom field
- Sort custom posts in archive by multiple values: date AND meta key
- Sort by last word in title
- change order of images attached to post
- How to manage a particular “order by” for get_search_query()?
- Plugin that lets visitors Like a post (not facebook) and stores likes in custom meta?
- Custom Taxonomy Sort For a Custom Query
- ASC and DESC separately from orderby
- How can I sort my loop based on meta data, using a form?
- Sort by price wpdb
- sort title descending with title with number
- How to sort by multiple values in a nested WP_Query
- Sort posts on custom field AND after that sort on date?
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- WP Tax query & order by tax query not working
- New custom post type entries are not sorted correctly in admin using pre_get_posts
- Display three sequential posts on each page load, without repeating previous
- How do I sort post listing by child post count?
- How to sort post_meta in edit.php?
- Sorting meta box values by start- and enddate and all dates in between
- Sort Posts with custom meta key by default which is currently set as optional
- Archive with specific keyword by category sorted by date
- custom sort posts in archive/taxanomy page
- Woocommerce backend sorting product drag drop by menu_order to date
- Sort by multiple columns using get_posts