You can make all sorts of selections using wp_query
. In your case try this:
$query = new WP_Query (array(
'post_parent' => 93 // get the children of page with ID 93
'post_count' => 7 // get 7 child pages
'orderby' => 'rand' // order the results randomly
));
Once you have this, you can loop through $query
in the usual way.
Related Posts:
- wp query to get child pages of current page
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- WP_Query orderby date not working
- Order by optional meta key?
- Sorting: custom query with orderby meta_value_num THEN by title
- WP_Query order by multiple meta keys & fields
- How to get order of posts?
- Order posts by ID in the given order
- Sorting posts by custom date fields (non standard date format)
- WP_Query sort by comment meta data
- Order posts by tags count?
- Merge 2 args in one WP_Query and order it by date
- Orderby = none not working [duplicate]
- How can I display recent posts from a particular category in my header?
- WP_query ‘orderby=none’ Problem
- Revolution Slider Orderby Two Custom Fields
- Pagination is not working using WP_Query
- List the 5 most recent child pages
- Ordering by meta_value AND date NOT WORKING with wp_query
- WP_Query orderby breaks when using AJAX?
- Custom Post order for homepage
- Change default ordering of taxonomy terms – pre_get_terms
- WordPress WP_Query orderby being overwritten
- WP_Query Order by Specific Post ID First
- WP_Query arguments to fetch custom post type posts which are in certain category?
- Sorting posts DESC based on the number of comments using WP_Query
- Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?
- pre_get_posts order by not working
- Set order of returned items in the WP_Query() class/function
- Pagination of a WP_Query Loop in a child-page page template
- (Solved) WP_Query ($ args) -> How to sort letters and numbers within the same array
- How to get all child pages in their parent page?
- Orderby ASC changes to DESC in WP_Query
- Search pages that are a child of the current page
- Which method is faster to get a single post?
- How to set multiple `orderby` in query argument?
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- Weird orderby => post__in issue
- How can I use $wp_query->tax_query as tax_query parameter for a new WP_Query instatiation?
- Order by summing multiple values
- Understanding the orderby in WP_Query?
- Order by empty custom field
- How to order posts by title after they have already been sorted by category
- Advanced ordering of query_posts
- Help ordering Post loop by two meta values
- Check if loop has any categories?
- Multiple filter conditions for WP_Query
- What happens to the default query when I use WP_Query?
- Ordering posts by an array
- Specify strict ‘order by’ in WordPress query
- How to Display Shortcode in the correct location, currently displaying before content after Page Title?
- WP_Query returns different results from get_posts() [closed]
- How order posts from category by date and comment count?
- Child pages not affected by orderby
- WP_User_Query orderby meta_val_num
- WP_Query custom order and pagination
- Sorting posts by Multiple custom fields in defined order
- How to create Page templates for showing Blog posts in different layouts?
- Get list of all Grandchild Pages
- Sort posts using multiple custom fields and menu_order in single query?
- WP_Query order posts by category
- WP_Query order by multiple meta keys & fields
- How to sort wordpress posts already selected by WP_QUERY
- Custom WP Query order function possible?
- Custom order revolution sliders post base slides as inserted in Specific Posts List field
- WP_User_Query Orderby Not Working
- Order by value of Custom Field using url string
- Order posts by tags count?
- Order Element By Custom Field in WordPress
- Query Order By Number Variable From API
- Order 2 meta_queries differently in WP_Query?
- Sorting with meta_query and multiple, optional meta keys
- Get posts by similar names and categories
- WP_Query: custom orderby (not ASC nor DESC)
- Order & Orderby clause not working with custom query
- WP_Query doesn’t return some child pages even though the database shows them
- Best way to Order Post in Home without a plugin
- orderby in WP_QUERY – Use the order from the Dashboard
- Query All Attachments and Order by Parent Publish Date
- Using orderby with 2 meta keys
- Order posts by custom column using pre_get_posts
- Add filter to Orderby Parameter using Array
- Order WP_Query results in order other than ASC or DESC
- Show sticky post before other WP_Query
- Custom query to order by multiple taxonomies
- Sorting: custom query with orderby meta_value_num THEN by title
- query_posts with sorting on a custom datestamp
- Get post closest to today
- orderby in WP_query doesn’t works
- Posts2Posts, wp_query and orderby issue
- Order by meta values
- Change posts archive ordering
- WP_Query issues with argument posts_per_page
- Get author meta data with no published posts in author.php?
- orderby and order filter in get_posts or WP_query function in wordpress not working
- How to display posts from a specific term first then another posts from another terms using tax_query
- Why does wp_query only display the most recent post when using order ASC?
- How to put posts with some taxonomy on top of others in `pre_get_posts`
- WP_Query sort by ACF date field (newest first) with blank dates first
- new WP_Query with order args – no more distinction between categories