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
- similar of my posts in all over the internet sites and blogs [closed]
- Making my plugin multi-site compatible
- Remote upload file to server B
- Checking if an attribute exists in a shortcode
- How to Check If A Plugin Is Enabled Through API?
- How to tell if plugin has been network activated
- How does WordPress Multisite know that a Plugin is installed?
- Delete Post With No Traffic?
- Automatically Creating Posts for Popular Forum Topics or Products [closed]
- Generate custom output for page/URL in a plugin
- What’s the recommended process for organising collaborative posting?
- How to list the Hooks and order of execution in current loading page? [duplicate]
- How to edit plugin’s html? [closed]
- How ( and mostly at what time ) can i prevent the alternate cron from running?
- What is the function to get plugin base url in multisite?
- Can a plugin add to header/footer/body content?
- How can I get a list of plugins and which blogs are using them?
- Multiple Domains with Single WordPress Install
- Multisite mu-plugins site-specific directory
- Multisite Backup Plugin [closed]
- Multisite Widget/Content
- force customers to add only single item to card per purchase EDD [closed]
- Preventing BFA in WordPress without using a plugin
- Output HTML only on individual post view
- Multisite installation but do plugins always have to be multisite compatible?
- Manually add order item with fixed product_id in WooCommerce
- ‘Customize’ button in admin bar for CSS
- Auto delete WordPress users according to time
- Multiple sites, multiple countries
- How to show Recent Page instead of Post?
- How can I disable the multisite feature of WordPress 3.0?
- Overide plugin files from child theme (/inc/ ) folder
- wp_schedule_single_event not working: cron job is triggered but nothing gets executed
- Multiple domains issue
- Add ALT attribute to Pin It Button image to pass HTML5 validation
- Customize The Events Calendar to Include an Option to Expand for More Events Listings
- changing posts layout in ultimate member profile plugin
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- Why shortcode always displayed after footer not in body
- How do i get file_get_contents to work in wordpress
- Plugin Development – Functions or Hooks?
- Add some fileds to the wp_posts table
- Add filter on html tags,attributes on specific function in wordpress
- Overriding an Array in a Plugin’s Class/Function from functions.php
- Change Header (Logo) Based on Login
- Each User has a Personal Blog
- How can i summerize posts or news automatically in word press site?
- Completely remove ability to create users?
- wp_mail – using a custom field value
- Edit page header on a custom plugin
- looking for a multi-user hello-world plugin
- How to get values from network settings panel?
- How to fix these PHP Warnings with the “Feed JSON” plug-in?
- Custom content plugin for front page in wordpress
- Bulk User Deletion
- Best method of implementing compartmentalized custom post types on a multi-site network
- In Multisite Setups, how to update mass sections of sub-sites
- WordPress Multisite Profile Picture Sync Error with Nextend Social Login Plugin
- How to hide featured images of all posts falling under the same category in wordpress?
- Give custom page template a custom post ID
- Cron: Update four post at Hour
- Multisite – Cloning CPT pages + content (including ACF Flexible Content) from site to site
- how to change a static testimonials into dynamic
- Rename a folder via HTML POST request
- How can I add a custom Javascript snippet to display my feedback in footer?
- My wordpress local urls is still displayed even moved to live
- working code, not working – Plugin Dev
- Cannot view Custom Post Type no matter what I try
- get_posts query results out of order but shows correct in php snippets plugin
- Custom shortcode being shown in WPBakery backend rather than the block
- User upload dashboard
- How to restrict the user from viewing comments but with option to write comments?
- Create dynamic / data driven pages in wordpress
- custom/automatic export function – one post at a time?
- The etiquette of forking a plugin and table tag
- How to restrict “too soon” downloads with a general rule?
- Confusing problem with displaying message recipient metadata
- Hide some shortcodes on posts from back-end
- Show image or notification on specific blog in multisite
- Force Network Activated Plugin to Run After Site Level Plugins
- WPMU site in subdirectory: When I clone a site with NS Cloner Pro plugin, how do I remove the subdirectory from the URL?
- Add a filter to a different custom plugin
- Managing database tables in WordPress multisite
- How to avoid conflict between plugin and its edited version?
- How to edit a non logged in page?
- Take Elementor For Email FIeld Check if user is registered. IF not registered then register on woocommerece
- How to create specific wordpress Table