You could create a function with a query that gets all posts older than a certain date, loop through the posts and set your archive variable. If you call that function with a custom action hook like this add_action( 'my_daily_archive_cronjob', 'archive_old_pages' )
you can trigger it daily with this plugin: WP Crontrol.
Related Posts:
- How to display by default only published posts/pages in the admin area?
- Admin – create custom post status and display above table
- Using single.php from plugin folder instead of default template folder
- Any way to create a revision of a post ONLY with a new button in the Meta Box?
- Static posts page with home.php
- Pagination not working on Custom Page Template
- Overview with latest edited posts and pages
- Hiding by default specific post status on backend list?
- Allow role to delete posts but block him the wp-admin
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- How to get a nofication when post submitted
- Is there any WordPress alternative to Book module of Drupal?
- Posts vs. Pages
- Adding buttons to Add New Post and Add New Page
- WP Admin register taxonomy and post type performance
- Static posts page with home.php
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- disable Tab post on nav-menus page (Admin)
- How to detect when admin user is on the All Posts page?
- WordPress Query Posts From Category Post on Static Page
- How to add convenient buttons for new custom post statuses
- I don’t want the complete article to show on homepage
- Organization of time insensitive content
- What would causes search to return incorrect results?
- Changing permalink of WordPress
- Added a ACF field to custom page and want the results to show as a column in admin
- Show post count in custom taxonomy page
- Hide or remove custom post status
- post and page and custom post type
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- Permalink base only for posts
- Hide Admin posts & pages in Dashboard
- Creating widget – ask for selecting a post in the admin panel
- issue in wordpress auto delete post and redirect to another 1
- Allow users to create their own page/s
- Make a custom URL and link to custom Template
- Choose options via url
- Automatically delete default posts and pages on theme install?
- How to have more post in a page than in your home page
- custom post type single page template not working
- How to have 2 posting pages on a blog
- Post Format Status [closed]
- Edit Page button is gone
- Get the Current Page Number
- Post/Page Preview Template
- using wp_update_post on save_post
- WordPress plugin to publish to multiple remote WordPress blogs
- using slug instead of ID in admin edit post url
- Change admin startpage to Pages-page?
- Display posts by tag on page
- How to wrap every image in a post with a div?
- Can I change a post to a page by changing it’s type?
- WordPress Delete hook with wp_delete_post function?
- Add a custom option to a page in backend
- Order post by year DESC and month ASC
- Populating a page with content from post custom fields
- Do I use custom post type or something else?
- Replace existing pages with new pages, keep menu links
- Custom post type permalinks breaking due to 3.1 bug fix
- ‘Invalid post type’ error when importing from one site to another
- Can a page_id and a post_id be same?
- Differentiate between posts and pages in search results
- Getting a 404 error when clicking edit page
- How to make number of blog posts a custom field?
- WordPress blog or WordPress website
- Hiding Draft Post In Admin
- Restrict edit, but allow preview for custom post status
- How do I do a page break?
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- static landing page leading to author specific pages w/ “live” content
- How can I add a box to edit Order on a regular post?
- Filtering posts on Post Administration Page by Week Number instead of by Month
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- WordPress 302 Redirect to Random Product/Post/Page
- How to call posts under a specific category on static front page?
- Post Status Frontend Announcement
- Optimize CPT-function with a loop
- How to display only one category in a custom post type?
- Direct some posts to only appear on a specific page
- Different post views for different category views
- Turn off display for custom sidebar post widget when on the post it’s displaying
- How to bulk Update URLs to new values?
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- Include Recent Post in Category
- How do I customize the post page
- Clicking on a Post takes 10+ seconds for the server to respond, Pages will respond immediately
- Using WP page password protection as defacto login
- How to retrieve custom field values and save again as array
- Is there a Standard Format for Clean URLs for Archives of Custom Posts?
- Page not loading content – Body archive – page
- Checking if some condition is matched before inserting post into database
- How to display a paginated list of posts from one category on a page? [duplicate]
- Why is $_POST Empty in Profile Edit Admin?
- Redirecting posts in WordPress to a specific page
- How remove “recent comments” title without modifying code? [closed]
- Wrap div-tag around posts in page
- When and how will php code in a user made WordPress page be executed?
- Post data returning null [closed]
- WordPress Custom Post type csv exporter