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.4   Updated Sunday, February 22nd, 2009 at 8:20pm

This Day Plugin for WordPress

After every post, this plugin will list other posts on the same day from other years. Options include adjusting the number of posts to show, changing the sort order, the header text, hiding password protected posts, and more.

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 DDThisDay)
  • Test it out by viewing a post. Of course for it to display anything, there must be at least one other post with the same month and day as the one you are looking at

Change Log

  • 09-22-07 Version 1.4 – Option added to hide password protected posts (they were hidden by default before). Non-published posts no longer show up in the list. Added ‘Load Default Options’ button.
  • 05-16-07 Version 1.3 – Updated for WordPress 2.2
  • 04-07-07 Version 1.2 – Updated for WordPress 2.1
  • 01-02-07 Version 1.1 – Modified to only list posts
  • 04-04-06 Version 1.0 – First release

Notes

This plugin will not display anything (not even the specified header text) if there are no matching posts. So if it does not seem to be working, make sure you are viewing at a post that has other posts on the same day.

Options

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

Max posts to show

This allows you to set a limit on the number of posts that will be displayed. Set this to 0 for no limit.

Sorting

You can choose to list newest or oldest posts first.

Header text

This will be shown before the list of posts.

Show other posts from today

Enabling this will show other posts from the exact same date as the post being viewed (otherwise it will only check other years).

Show the year

If enabled, this will show the post year after each post in the list.

Hide password protected posts

If enabled, password protected posts will not show up in the list.

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

  1. but without status check, it will show my draft in the list

  2. ijliao: Because of the way the database was changed in WordPress 2.1 – I do not like it either ;) It makes it a hassle.

  3. why remove “post_status = ‘publish’” from your sql query ?

  4. Norm: This plugin lists the other posts on the same day as the current post. This is why it can only work on the single post page. It would not know what post to check for on the index, or archives, etc.. pages.

  5. the plugin works great but only seems to work on the posts permalink page, not on the main page of the blog. Is it supposed to work this way? Let me know if you have any ideas on how to fix this.
    Thanks!

  6. aha i have done it!

  7. hello,i like this plugin very much.
    but i have a question:
    how can i “Lists posts that were created on this day in previous years” in the sidebar of my single post?
    thank you very much!

  8. Bob: I believe this was due to database changes that were made to WordPress 2.1. I just updated the plugin and uploaded version 1.2, which should take care of the issue – let me know.

  9. I just ran across my first issue with this plugin. I normally add photographs to blog posts manually. Today, I used WP’s upload. When I did, This Day added a link to each of the photographs. I then deleted the uploads and added the photographs manually as I usually do.

    The links to the non-existing photographs, because I deleted them, are still there. How can I remove these?

  10. zhou: I certainly need to at least add them to this page – I just often forget, as I am constantly working on many different projects at once, in addition to keeping this site updated, as well as many others, etc.. Pretty soon I will probably go through all the script/plugin articles and add in extra info from the comments though :)

  11. [...] “Dagon Design – This Day“,汉化 以在每篇文章的下面显示”今天”我写的文章,范例 (2人) [...]

  12. 34
    zhou

    Aleister, I find some discussion in comments are very helpful such as how to use echo ddtd_show_posts(). Why not arrange them in a ReadMe? If I were a native English speaker I would do this. :-)

  13. [...] Dagon Design – This Day:显示历史上的今天,重温过去; [...]

  14. Dave: 1) That would be possible, but some code would have to be modified. Having it only display posts from a particular category would be the easiest to do.

    2) The current plugin will not really do that, because it generates its data when a post is being viewed. It would be possible to create a plugin (that displays in your sidebar for example), which lists previous posts from the current date (instead of the data of the post being viewed).

    If you are interested in having a custom version created to do either, please contact me :)

  15. My blog is interspersed with posts to memorialize events that happened on a certain day (in my case lost submarines). As the anniversary of each date I would like to display only these posts from previous years.

    Is there a way to:
    1. Display ONLY posts on “this day” that meet a certain criteria? (maybe a tag, or that fall within a category)
    2. Display posts from previous years even if there are no posts for today? (I saw a similiar question posed, but did not see an answer).

Pages: « 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.