How to schedulle a post to be unpublished?
How to schedulle a post to be unpublished?
How to schedulle a post to be unpublished?
Include “Scheduled” (“Future”) Posts in WordPress Post Navigation ( previous_post_link, next_post_link ) for a Specific Custom Post Type
It sounds like you need to flush your rewrite rules. There is a flush_rewrite_rules() function, although the codex isn’t terribly useful with how it is used.
I assume what you are doing is pulling 3 posts, one or more of which may be ‘Future’ posts, displaying some kind of preview and a link to the complete post. When you click the link for ‘Future’ posts, you get the error. ‘Future’ posts are going to be blocked for people not capable of … Read more
Unless i missunderstood you, This should be easy to do without using a plugin… Embed this in your functions.php: function echoDayImage() { // GET CURRENT DAY $currentDay = get_the_time(‘l’); // CHECK DAY AND ECHO SUITABLE IMAGE if($currentDay = ‘Sunday’) {echo TEMPLATEPATH.’/images/Sunday.jpg’;} elseif($currentDay = ‘Monday’) {echo TEMPLATEPATH.’/images/Monday.jpg’;} elseif($currentDay = ‘Tuesday’) {echo TEMPLATEPATH.’/images/Tuesday.jpg’;} elseif($currentDay = ‘Wednesday’) {echo … Read more
Here is one idea to hide the Edit link via CSS: function wpse85434_hide_editlinks() { if(!current_user_can(‘manage_options’)){ // only for non-admins echo “<style>.misc-pub-section .edit-timestamp{display:none !important;} </style>”; } } add_action(‘admin_head-post.php’,’wpse85434_hide_editlinks’); add_action(‘admin_head-post-new.php’,’wpse85434_hide_editlinks’); I use !current_user_can(‘manage_options’) so it will be visible for the admin. Before: After:
Check if ( defined( ‘DOING_CRON’ ) && DOING_CRON ), which will be true if the post save is triggered during a scheduled cron job.
Ok. Here is an easy fix for that problem. You need to first convert the integer or string to date. See the codes below to understand how to do that: First change this line: $postdate = date($awyear.’-‘.$awmonth.’-‘.$awday.’ ‘.$awhour.’:’.$awminute.’:’.$awsecond); TO $postdate = $awyear.’-‘.$awmonth.’-‘.$awday.’ ‘.$awhour.’:’.$awminute.’:’.$awsecond; Now, convert the $postdate to time string by using strtotime function. $cvtpostdate … Read more
First, don’t use query_posts(). Note: This function isn’t meant to be used by plugins or themes. As explained later, there are better, more performant options to alter the main query. query_posts() is overly simplistic and problematic way to modify main query of a page by replacing it with new instance of the query. http://codex.wordpress.org/Function_Reference/query_posts The … Read more
The closest thing I can think of is a plug-in which will periodically take a draft and publish it for you. http://wordpress.org/plugins/drafts-scheduler/ Maybe that will help you. Update: above plugin has some issues so I wrote another one for this purpose. http://www.superblogme.com/auto-post-scheduler/