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 post__in remains ineffective in the Loop [closed]
- WP_Query orderby date not working
- Order by optional meta key?
- Sorting: custom query with orderby meta_value_num THEN by title
- Order by DESC, ASC in custom WP_Query
- WP_Query order by multiple meta keys & fields
- Secondary Sort (fallback) for WP_Query
- Query Posts in a Predefined Order
- How to get order of posts?
- Order posts by ID in the given order
- Custom WP_Query order by post_meta and (author) user_meta
- Sorting posts by custom date fields (non standard date format)
- WP_Query for WooCommerce Products
- How to order posts tag by tag?
- How do I order pages and categories by ID or name in the same query?
- WP_Query ordered by custom field that is a date string?
- 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
- Order posts by date and then by custom field
- How to order a post type with meta_value_num and if meta_value_num does not exist then order by date
- Revolution Slider Orderby Two Custom Fields
- Order posts ascending with number in title
- List taxonomy terms plus their latest post ordered by post date
- Using AJAX to return search form results
- Order by the results of a function with WP_query
- Pagination is not working using WP_Query
- Two queries on the same page with pagination
- How to order posts in wp_query by a meta_value of the corresponding author
- Order by menu structure
- Array Chunks and Inserting Varying HTML in WP_Query
- WP_Query order by date in meta_value
- List the 5 most recent child pages
- How to use order RAND() on WordPress?
- Show all parents and children in custom post type in right order
- Why is this coming back as null? Thats wrong. There is one post
- Ordering by meta_value AND date NOT WORKING with wp_query
- WP_Query orderby breaks when using AJAX?
- Order WP Query posts by custom order calculated from post meta values
- How to display future posts – modified query still yields 404
- Custom Post order for homepage
- Meta query with order by another custom field
- Change default ordering of taxonomy terms – pre_get_terms
- WordPress WP_Query orderby being overwritten
- WP_Query Order by Specific Post ID First
- Order Posts by meta value AND published date
- How can I pick a single post from the latest 3?
- Wp query orderby ‘title’ doesn’t work
- How can I order Wp_Query hierarchically?
- WP_Query arguments to fetch custom post type posts which are in certain category?
- How do I sort posts with multiple pages
- Sorting posts DESC based on the number of comments using WP_Query
- Order WP_Query by multiple fields, subtracting them from one another
- 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
- Need wp_query to return all children and grandchildren
- (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
- SQL: What is wrong with the following query (generated by WordPress WP_Query, ordering prices)
- Order By table field comment_status in WordPress > 4.0
- Search pages that are a child of the current page
- Which method is faster to get a single post?
- Complex WP_Query order request: DESC by day, but then ASC by time
- How to set multiple `orderby` in query argument?
- WP_Query order result by date AND meta_value
- Order by title without taking into account ‘the’
- WP_Query orderby author__in
- How to orderby multiple meta fields if some fields are empty
- Sort wordpress custom posts based on meta value
- WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC
- Weird orderby => post__in issue
- Import wp users via one click demo option
- 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
- Adding column to wp_posts table or join wp_posts table with another table
- Two loops on archive page
- 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?
- Order ascending is ignored in meta query?
- meta_value_num not ordering all items
- How to make search for posts using get method?
- Sort wp_query of two post types using meta datefield for one and date for the other – possible?
- How to use meta_query to retrieve posts from multiple custom post type
- filter the custom post type using wp ajax request
- Conditionaly move certain posts at the bottom of the query result
- WordPress WP_Query custom order_by post_type functionality
- How do I group results from wp-query
- Custom tag template to list posts in ASC order