[WordPress plugin] DateTitle – A plugin for automatic post titles

These days I seem to be writing very little code and I do that only if I need something and I am unable to find something similar already written. Recently I shifted my journal from LiveJournal to a self hosted WordPress install on my own site. I write in my journal fairly often though most of it is either private or friends only. I find it difficult to come up with a post title every time. Leaving the title blank kind of messes things up with WordPress so I started putting the current day and date as the post title – this keeps the URLs very nice and user friendly. After doing this a couple of times it struck me – Why not automate this using a plugin. A search revealed that the nearest plugin to my needs was SequenTitle automatically creates a sequentially numbered post title of your choosing if the title is left blank when the post is published.

Looking through the code I quickly realized what I wanted was very simple, about 30 mins of hacking and here you have the DateTitle plugin. Most of the code I borrowed from SequenTitle plugin mentioned above. Installation is like any other WordPress plugin – unzip and upload to the plugins folder, activate from the plugins page and you will get a DateTitle option in the settings menu…

Screenshot

Download: http://sanisoft.com/downloads/datetitle.1.0.zip

About Tarique Sani

Dr. Tarique Sani is a pediatrician and forensic expert by education. He is a PHP programmer of 'wrote the book' caliber and has to his credit several very popular open source as well as commercial PHP projects. He leads a team of dynamic programmers at SANIsoft who have in-depth understanding of Web development tools and usability practices with strong developmental skills in PHP, MySQL/PostgreSQL, HTML, DHTML, Javascript, and Linux/Apache

11 Responses to [WordPress plugin] DateTitle – A plugin for automatic post titles

  1. Ivan December 30, 2009 at 8:55 am #

    whoa… this is exactly what I really need for my phlog… thank you, Tarique!

  2. Ivan December 30, 2009 at 10:12 am #

    just a simple suggestion, I change the wp_title_intercept function to:

    ...
    if($post->post_date) {
    $post->post_title = date($options['title'],strtotime($post->post_date));
    } else {
    $post->post_title = date($options['title']);
    }
    ...

    So, if you want to change an old post like mine, it will automagically change the title with the date from its post submit date.

    • Tarique Sani December 30, 2009 at 12:28 pm #

      Thanks, Good suggestion – Will add when I update the plugin

  3. wordpress plugins February 23, 2010 at 3:54 am #

    Your blog is amazing, i first landed to another post but then get interested and thought, i will just look a little more arround to see what else i can find out about best plugins arround.

  4. Jeremy February 10, 2011 at 4:22 am #

    I would really love to use your plug-in but in need the title to display tomorrows date, and I also only need it to display for a specific category. Any help with changes or additions to the php would be greatly appreciated.

    Thanks.

    • Tarique Sani February 10, 2011 at 5:33 pm #

      Sorry Jeremy there are no plans to add anything more to this plugin in near future, but it is open source and you are free to modify it as you wish.

  5. daigoron March 28, 2011 at 3:45 am #

    I would really love to use this plug-in… but i need the time to display in german with swiss time zone (CET/MEZ) +1, actually +2. Any idea would be appreciated.

Trackbacks/Pingbacks

  1. A bit of FOSS contribution at Tarique's Travails - July 2, 2009

    [...] DateTitle – A WordPress plugin for automatic post titles If a title of a post is left blank this plugin will automatically insert todays date in a format of your choice. [...]

  2. » DateTitle – A WordPress plugin for automatic post titles at … Wordpress Plugins: Just another WordPress weblog - July 2, 2009

    [...] Read more: DateTitle – A WordPress plugin for automatic post titles at … [...]

  3. Automate The Maintenance of your WordPress Blog – FREE! - July 10, 2009

    [...] DateTitle – A WordPress plugin for automatic post titles at …- DateTitle – A WordPress plugin for automatic post titles. These days I seem to be writing very little code and I do that only if I need something and I am unable to find something similar already written. Recently I shifted my journal … [...]

Leave a Reply