Adding $args to wp_schedule_event() causes hook to add infinitely to WP Cron
Adding $args to wp_schedule_event() causes hook to add infinitely to WP Cron
Adding $args to wp_schedule_event() causes hook to add infinitely to WP Cron
Unable to run custom CRON jobs on aws server
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