Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.3   Updated Sunday, February 22nd, 2009 at 6:18pm

Scheduled Post Shift Plugin for WordPress

This plugin automatically takes your oldest post, and updates its timestamp so that it appears as the latest post on your WordPress site. It does this by utilizing the cron feature built into WordPress 2.1 (and newer). It can rotate all the posts on your site, or just ones in specific categories. You can currently schedule it by setting the number of hours between shifts. For example, set it to 24 hours and it will shift the oldest post every day, at the time that you enabled it.

Download

If you have found this page useful, please consider donating. Thanks!

Instructions

  • Download the above file, rename it from .txt to .php, and upload it to your plugins directory
  • Enable the plugin
  • Configure the plugin options (under DDPostShift)
  • Click the ‘Enable Post Shift’ button to start

Disabling the Schedule

To stop the schedule, simply click the ‘Disable Post Shift’ button on the options page.

Change Log

  • 02-22-09 Version 1.3 - Updated to work better in recent WordPress versions. Log file support added, and several other updates. Can also shift posts when no drafts are available.
  • 08-28-08 Version 1.22 - A few bugs fixed. Now supports multiple category rotation.
  • 04-27-08 Version 1.21 - Updated for WordPress 2.5 and to be compatible with WP Security Scan plugin
  • 09-29-07 Version 1.2 - Updated for WordPress 2.3
  • 05-16-07 Version 1.1 - Updated for WordPress 2.2
  • 04-09-07 Version 1.0 - First release

Options

Here are the options available in this plugin’s options page in the WordPress admin panel.

Shift Delay

This is the number of hours between post shifts. The schedule will start as soon as you click the ‘Enable Post Shift’ button.

Category IDs

If left blank, the plugin will operate on all of your posts. If you enter a comma-separated list of category ID’s, it will only update posts in those categories.

Log File

Full path on your server where you would like the log saved. You can leave this specific to this blog, or set up a global log for multiple blogs. Leave blank to disable this feature. Be sure to give this file write-access

Pages: [5] 4 3 2 1 » Show All

  1. 70
    Barry

    My plugin is working fine now. I just needed to imput the category I’d number instead of the category name.

    Thank you. Barry

  2. 69
    Barry

    My selected post are not rotating.
    I created a new category for the post I wish to rotate. I called it ‘Top Post’. That is what I typed in for my Category ID(s)field in the plugin set up. Everything seems like it should be working. Did I miss something?

    I get this response in my Scheduled Draft Publish log:

    06/14/09 08:37:24 wp_ Unable to find a post to shift.
    06/14/09 17:05:25 wp_ Unable to find a post to shift.
    06/15/09 17:12:17 wp_ Unable to find a post to shift.
    06/15/09 19:03:25 wp_ Unable to find a post to shift.
    06/15/09 19:06:12 wp_ Unable to find a post to shift.
    06/15/09 20:00:20 wp_ Unable to find a post to shift.

    Please help, and thank you very much. I think the plugin will be awesome when I get it running.

    Barry

  3. 68
    Lee Boswell

    i am trying to use the plug-in on a WordPress MU site but the script gives me the following error..Any ideas?

    Fatal error: Cannot redeclare ddps_add_option_pages() (previously declared in /home/ttpstude/public_html/blogs/wp-content/mu-plugins/dd-scheduled-post-shift.php:26) in /home/ttpstude/public_html/blogs/wp-content/plugins/dd-scheduled-post-shift.php on line 29

  4. 67
    Brian

    Maybe I’m doing something wrong, but the posts seem to shift for a day, and then revert back to the normal posts the day after. I’m running WP 2.7.1

  5. This is a great way to save time everyday. I’m glad I found it!

  6. What a great little plugin. Thanks mate. It gives my home page a renewed look everyday :)

  7. nice thanks man….

  8. 63
    Richard

    Thanks for the update. I can confirm this is now working correctly on wp2.7 Many thanks!

  9. Richard: The wrong copy was uploaded - This has been fixed. The category selection should be working now, and the shift should start 1 specified interval after the time you enable it.

    As for the file being created automatically - that is by design. Otherwise you would have to have a pre-created folder with write permissions for it to create the file in. It is no less work to just create the file manually if you choose to.

    Please re-download and give it a shot :)

  10. 61
    Richard

    One further point; Your directions state “The schedule will start as soon as you click the ‘Enable Post Shift’ button.” On this version clicking the enable button appears to create an immeadiate shift, as well as starting the time delay.

Pages: [5] 4 3 2 1 » Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.