create for these posts a customfield with the name expires
and the value is the date for disabling the post.
Use the following code in the Loop of your theme.
//Loop-Start
if (have_posts()) : while (have_posts()) : the_post();
$exTime = get_post_custom_values('expires');
if (is_array($exTime)) {
$exString= implode($exTime);
$seconds = strtotime($exString) - time();
} else {
$secondes = 1;
}
if ($seconds > 0) {
echo "<h2>";
the_title();
echo "</h2>";
the_content();
}
endwhile;
endif;
This code wont delete or drafting the posts. But you don’t see it in the front. Perhaos this is a possible solution for your problem?
Related Posts:
- How Is Network Activate Different From Activate (by Implementation)?
- Using Vagrant for customizable WordPress Multi-sites [closed]
- WordPress network: set themes and plugins for new blog
- How to get last_updated and newest_blogs in WP 3.0
- How to make sexy bookmarks plugin work in WPMU
- Check if User exists in WordPress Multisite
- My Category is too big on the Menu what can i do?
- Does any one have Idea to get these functionalities with the plugin wp-multi-network
- External Domain on WordPress Multisite
- Setup page on first login on multisite
- Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?
- Redirect to another page using contact form 7? [closed]
- Hide fields in woocommerce settings
- Best method to upgrade multisite plugin’s numerous database table
- View Private Published Page with URL Code (no login required)
- WordPress on AWS with ELB
- Multiple sites, multiple countries
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- JS Support Ticket – Auto create WP account
- How to show Recent Page instead of Post?
- Remove Duplicator plugin from admin menu if not an administrator
- Input with spaces in Shortcode attributes overwritten by defaults
- Cron job not firing
- Solutions to repost categories into multisite blogs?
- Add a custom form on the post-new.php admin page
- How make a php script run only with wp-cron
- Removing customise fields during plugin uninstallation
- Edit Yoast SEO breadcrumbs output [closed]
- What’s the best way to implement AJAX in WordPress?
- How to Create a Custom Panel and Fields in Post Page [Plugin]
- Translating long texts with html formatting
- Media is not attached after import
- How can I disable the multisite feature of WordPress 3.0?
- NGiNX + PHP5-fpm + CDN Tools (plugin) [closed]
- Any recommendation on how to manage ads?
- Plugins not showing in Multisite dashboard
- How would I go about creating a user ranked post popularity page?
- How can I force users to a particular subdomain to log in for MU (Multisite)?
- Anonymous Postings
- Do widget options need to be escaped widget()?
- Is there any W3C compatible Share & Follow plugin?
- Does using WP-cron make the site slower for the user?
- Disable woocommerce cookies and delete cart data automatically
- className not populating in custom block
- Show function to super admin
- Generate pages from markdown files in github automatically
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Run plugins only on certain pages
- There is any way to remove post-format filter? [closed]
- Overide plugin files from child theme (/inc/ ) folder
- Install (enable) plugins on multisite, on localhost
- wp_generate_attachment_metadata is creating an empty array
- wp_schedule_single_event not working: cron job is triggered but nothing gets executed
- custom payment gateway in woocommerce failed to connect to remote api server
- Display encrypted content on my website
- WordPress multi domain – redirect
- Post category with counts been display like a menu
- Post custom Data value in The Events Calendar plugin [closed]
- Send reply with pre-prepared answers
- How can I copy all users to newly created site on a multisite network in WordPress?
- Best way to maintain and update 3rd-party WP plugin when developer is unresponsive?
- Save custom attributes of product in woocommerce
- How does task scheduler plugin implements cron that is not dependent on page load request? [closed]
- How to make a implement queue for scheduling tasks in WordPress?
- Calling an attribute from a plugin shortcode
- Best place for short bio,image and button [closed]
- WordPress wp-admin/network/plugin-install
- Use of Templates in a Plugin
- Create a multisite network for an existing installation
- Why can’t I access my Intranet LDAPS with NADI?
- “Micro-Site” Options
- In the archive widget, how do I sort in between two years?
- Customization API for plugin development
- Automatic plugin updates not working
- Fromcraft Plugin On click submit button [closed]
- creating a custom shop page display on archive woocommerce
- How to create user that has permission to create new sites on WordPress with multisite option enabled?
- Configuring Propel to Work with Multisite
- polylang + category/tag custom language link
- Anspress Customization: How to show logged in user votes on a single answer?
- Custom wordpress Theme and Plugin repository
- Automatic Updates Individual Plugins Not Working
- How do I make a child theme I made POST through a 3rd party plugin?
- Subdomains with almost the same content
- How create Group Blogs based on user created Groups
- Uninstalling plugins across all sites
- Multiple domains issue
- How to redirect users to their profile after they successfully edit their profile
- Add ALT attribute to Pin It Button image to pass HTML5 validation
- date/time-picker and file upload (image) fields for custom fields (e.g. with more fields)
- Getting Theme element into plugins page editor in wp admin
- WordPress as web application base
- Users are being redirected to main site when trying to register on subsite of my Multisite network
- Customize The Events Calendar to Include an Option to Expand for More Events Listings
- Cron Job not working in plugin
- URL rewrite of independent plugin?
- Plugin for users to create their own ads like Google Adsence
- GeoMashup plugin: how to customize cluster markers / icons? [closed]
- “Master” WordPress Multisite – Database Sync
- Will these plugins work with wp multisite?