I see two approaches: via cron job… or website / page cache which lasts 1 week.
In case you want to do the cache option: you just need to add 'orderby' => 'rand'
to your WP_Query
and install a caching plugin for your page, then set it up for 1 week.
CronJob: you need to setup a script which starts every week. For this you need to setup the cron job for your WordPress – https://www.siteground.com/tutorials/wordpress/real-cron-job/, then with the help of wp_schedule_event
you can create a weekly task to update your posts.
Related Posts:
- WP Query Args – Title or Meta Value
- WordPress Pagination Not Working – Always Showing First Pages Content
- Whats the difference between post_limits and pre_get_posts?
- Order Search Results Page by meta_value If no Value Return Remaining Results
- Query WooCommerce orders where meta data does not exist
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- What exactly does the ‘s’ parameter search for in WP queries?
- Query all posts where meta value is empty
- get_posts not finding argument: post_name
- get query’s query string
- Show only oldest post by author
- How to get post meta value and post in one query?
- Revolution Slider Orderby Two Custom Fields
- wp query by search in titles only & put the posts in loop
- Get random terms
- Dynamically Override Fancy Title – Part II
- Woocommerce custom loop to show all the products [closed]
- Count posts returned by get_posts in external PHP script
- How to run query inside a class with namespace?
- Pagination 404 errors for author posts query on author.php
- List the 5 most recent child pages
- Meta-value query
- Modify existing query and change order of posts
- Adding multiple post queries with parent and children to page – Best Way
- Why does the_content not work like others for a set post id?
- Complex Orderby Parameters: How to query with multiple orderby parameters using meta_value_num?
- Rewrite rule to prettify two $_GET variables while in a new endpoint from a page
- Creating a custom search for a specific post type
- How to add post_distinct filter to WP_Comment_Query?
- new WP_Query(), have_posts() return false in user_register hook
- How to filter, restrict and return posts based on custom user meta information
- Masonry, WP_Query & paged – first page repeating, second page not loading
- Query posts intersecting tags and categories
- WP_Query ignoring tax_query when is_singular
- REST API: Limit Read Permissions for Default Endpoints
- Excluding pages in WP_query using ACF
- How to sort post by custom table value
- Pagination on static Posts page
- WP_Query : Search and Filter Using custom field AND/OR custom taxonomy
- Query all posts if multiple meta key don’t exist
- Is it safe to access the underlying mysqli object from \wpdb for custom queries?
- wp_query to print posts if have X custom field value
- Rewrite gets completely ignored
- Check for the main query from the template
- How do I turn these values from MYSQL into an array
- get_posts() and global variables
- Use Ajax To filter posts?
- Should $query-> be used with conditional tags?
- Get user posts with custom WP_Query on author.php
- How to combine two WP_Query objects?
- WP_Query author parameter not working
- How to order posts on each different category?
- Getting the post terms ‘wp_get_post_terms’ per post when within the functions.php file
- Posts Query | Query to only show sub categories
- Loop 3 posts column wise and continue the loop into same columns
- Is it possible to retrieve posts depending on meta_key LIKE condition? [duplicate]
- WP Query and date format
- How to Order By Two Custom Fields?
- Display specific page (that is child) content on parent page
- WP_query problem -spurious results
- Avoid duplicate while merging two query post
- function wp() does not use meta_query?
- Query Not working as expected
- How to create single page site in WordPress
- max_num_pages says 4, yet I am only able to navigate to the third page
- Widgets: Show Recent Posts Only if the Posts Have Both Categories X and Y
- Execute PHP function inside the admin area
- get_children() Archive Template
- What’s the best way to make a blog page on WordPress?
- paginate_links appearing on page but it doesn’t actually paginate – pagination on a static page with a dynamic `post_type` argument on a static page
- Populate select list with meta values from all posts of a Custom Post Type
- tax_query not working on custom post type
- Form checkbox value going to dynamic URL
- Exclude post from wp_query based on custom field boolean
- WordPress Meta Query Null Values Order
- WooCommerce WP_Query using tax_query returns no results (0 = 1)
- Translating WP query into to SQL query
- How to get top rated posts using wp query?
- TAG Query showing only 1 result
- Tax_Query not working – connecting to second wordpress database
- How to search CPTs in draft using get_page_by_title()
- WP Query Meta Query
- Empty ‘terms’ in ‘tax_query’ returns an empty array
- Archive – Show Page Month Headers
- Get newest value of an array
- Return a single custom post from multiple meta queries
- ordering and optimizing functions
- Why does order ASC break offset in WP_Query?
- query post based on comparison
- Dynamically create array from page title
- Ordering Custom WP_Query loop by meta key value with pagination
- wp_pagenavi on WP_Query using customfields
- paginate_links() on page (shortcode output)
- WordPress Query Returning Every Post
- How to write a query-function as a query-shortcode?
- shortcode with $atts with strange results
- SQL query into to WP query
- WordPress WP_Query Search (‘s’) With Multiple Search Terms
- I want to place a post before all others from an ACF boleen field
- How to put posts with some taxonomy on top of others in `pre_get_posts`