Updated Today

by Chris K

About the “Updated Today” Plugin:
This is a WordPress Plugin that will display a graphic in the upper left corner of the blog when the blog has been updated the day of the view. This is my first plugin and I intend to make more. If there are any problems with this plugin let me know in the comments. Any suggestions are welcome and comments please.

Download version 2.5

This is tested on the most recent version of WordPress. The minimum for this plugin is WordPress 2.7.1.

To install this plugin within WordPress
1. Login to your WordPress admin area
2. From the Plugins menu choose “Add New”
3. Search for ‘updated today’
4. Verify that it’s the ‘Updated Today Plugin’ and click ‘Install’
5. You should now have ‘Updated Today’ as an option in the Settings menu, go there and set up the plugin to your liking.

To install this plugin manually:
1. Download the .zip archive
2. Unzip and upload the “updated-today-plugin” folder to your “wp-content/plugins/” directory
3. Then simply Activate the Plugin
4. If it does not display be sure to check that this line of code is in the footer.php file of your theme:


Change Log:
–Version 2.5–
Moved CSS into wp_enqueue_style
Moved pngfix.js into wp_enqueue_script
Added ability to upload images

–Version 2.4–
Added an option to make the image a link to the most recent post.
Cleaned up the options to a single Datbase Entry to require less calls to the get_option function. This also imports your old settings automatically.

–Version 2.3–
Cleaning a little house from old settings and code.
Plugin now sets defaults upon activation and removes settings from the options table when deactivated.

–Version 2.2–
Added the ability to change what post types (post or page) and if it’s modified or published status that is checked. Also added the option for if the banner displays in the header area, or the footer area. Useful for some themes if it just won’t display correctly.

–Version 2.1.1–
Changed date(“Y-m-d”); to use date_i18n(“Y-m-d”); to avoid date conflicts when timezones are set in WordPress

–Version 2.0–
Added a ‘Settings’ page in which you can choose your image to display, the side of the page it displays on and allows the blogger to upload their own images to the specified folder.

–Version 1.8.1–
Cleaned up the whitespace on the CSS and added CSS to make the padding and margin on the image ’0′.

–Version 1.8–
Modified database query to use the $table_prefix variable for databases containing multiple WordPress installations as well as people who modified the $table_prefix on setup.
Big thanks to Georg and TeraS for their help on testing for this one!

–Version 1.6.1–
Fixed an error with some themes that made their header image use a Z-Index of 99, which matched that of the plugin. Changed the plugin Z-Index to 100. – thanks TeraS

–Version 1.6–
Fixed the banner from displaying when a draft was created by adding the post_status query to only include posts with the status of ‘publish’

–Version 1.4–
Fixed the issue with not displaying transparent in Internet Explorer
Fixed link of the banner to now go to the post id instead of the guid URI

–Version 1.3–
Plugin is now fully WC3 Compliant
Minor CSS style changes
Added configuration boolean (true/false) settings for placement, style, and pngfix.
Added link to the most current post
Known Issues:
When a picture is used in a post, that picture becomes the target of the link on the banner.

–Version 1.2–
Chromakode is now helping me out with some of the testing and coding.
Improved WC3 compatability (still one more issue to resolve with code placement)

–Version 1.1–
Included pngfix.js in to the plugin folder in order to make for an easier install. This allows for transparent png’s to be visable in Internet Explorer.
Thanks to http://homepage.ntlworld.com/bobosola/ for the PNGFIX code.

–Version 1.0–
This is the initial release of the plugin.
Possible issues:
Not certain if every WordPress install uses the same field names for the post_date and same table names.

{ 73 comments… read them below or add one }

TeraS April 7, 2009 at 12:45 pm

I have been using this plugin for some time wih no problems. When I switched to the Mandigo theme, the banner is hidden behind the header image now.

Any idea how to fix this?

Thanks in advance!!



Chris K April 7, 2009 at 12:58 pm

Hey Tera,
I looked into the issue, and it looks like that theme had increased the Z-Index of the header image to the same Z-Index that I made the banner. I have updated the plugin to 1.6.1 to modify this. You should be able to download it anytime now at the Wordpress site as version 1.6.1. I made the Z-Index of the banner 100 instead of 99 and it fixed it on the test installation with the Mandigo theme. Thanks for the bug find!



TeraS April 7, 2009 at 2:34 pm


Thank you for the fix Chris!!



Shihab.I April 8, 2009 at 6:05 am

thanxs but i cant update from Version 1.6 to Version 1.6.1


baron April 8, 2009 at 6:30 am

Works great, thank you


Georg April 8, 2009 at 8:51 am

I have installed it on my WordPress portal: http://wordpress.blogos.dk, but the graphics does not display. Is it the theme or what? The wp_footer() – or the equivalent do_action(‘wp_footer’) – is present in the theme.

I also made a Danish banner, but it is not yet on this blog.

I run WP 2.7.1, by the way, and I have published a post today. :-)

Any suggestions?


Chris K April 8, 2009 at 11:53 am

You will probably need to do a manual update for this version. I have been having lots of problems with the Wordpress Subversion updates. It took me over 24 hours for them to even update the plugin on their site, and now when you try and do an automatic update, their system isn’t recognizing 1.6.1 as a different version than 1.6. Sorry.


Chris K April 8, 2009 at 12:12 pm

I took a look at your source, and the plugin has added both is CSS and IE 6 pngfix.js file so the plugin is active, as the wp_head hook is being called correctly.

It looks like the do_action(‘wp_footer’) while being the ‘equivalent’ to wp_footer (according to Wordpress) does not use the wp_footer hook correctly which is the hook the plugin uses to interject the coding. I have tested my site by adding BOTH wp_footer() and your do_action(‘wp_footer’) and it has not caused any errors so you should be able to go ahead and just ad wp_footer() to your footer.php file without error.

I will take a look into this in my future releases for a fix but right not, the codex page isn’t turning up anything quickly.



Chris K April 8, 2009 at 12:19 pm

So I just removed the wp_footer() from my footer.php and left only the do_action(‘wp_footer’) to my theme and it functioned without error. I suggest trying a different them for a short minute to verify that it works with another theme. It may be that the theme you are using is causing an error in the calling of the hook.


Georg April 9, 2009 at 1:07 am

I have tried several themes, and it does not work. I have tested it with iNove on http://test1.blogos.dk and with Amazing Grace, Blogline and Fusion on http://wordpress.blogos.dk. I have tested it with Firefox 3.0.8 (with a lot of add-ons), but also with Opera and IE. So I really don’t know what more I can do? Any suggestions for version 1.6.1?


TeraS April 9, 2009 at 5:36 am

FYI Chris…

Plug-in does not display in the Women Theme…



Chris K April 9, 2009 at 7:39 am

@Georg @TeraS
I am not sure what’s going on with your blogs at this time. When I try and visit your blogs I see the plugin writing both the Javascript as well as the CSS styles for the banner which are in the same function as the banner div tag itself. For some reason your sites are not writing this code. I have tried to duplicate your errors with my own blogs using the same templates but cannot do so. Everything displays perfectly fine at http://chriskdesigns.com and http://chriskdesigns.com/wp27 (my test blog)

I have removed and re-installed the theme plenty of times thinking maybe it’s an installation issue, but that is not causing the problem either. Alas, I will keep searching for the problem. Have you both tried to display it with the default Wordpress theme?


Karl Foxley April 9, 2009 at 9:19 am

Thanks for creating such a neat plugin. It is certainly very helpful to grab a readers attention regarding new content and this is a great visual way of letting people know.

To your success,



Chris K April 9, 2009 at 3:29 pm

Keep your eyes open for version 1.8 to release sometime in the next 24 hours.


Georg April 10, 2009 at 3:52 pm

Great job, Chris!

Now, I wonder whether you would like to develop this plugin a little further? I have a site where it would be quite nice if it would be possible – as an option (?) – to to let this plugin check whether a page was created or edited.

An “ignore all/post/page/ updates just today” option would also be nice!

Well, for your consideration!


Chris K April 10, 2009 at 11:20 pm

I am planning on adding a settings page for the plugin in future versions. The options I would like to add are placement, when to display (modifications, new posts, or new pages), different images, etc. I will keep the site updated to reflect any beta versions.


Wayne April 11, 2009 at 4:26 pm

Thanks for such a nice plugin Chris. I have a question though, is it, or would it be, possible to place the banner in the upper right hand corner instead?


Chris K April 11, 2009 at 4:32 pm

People have done it, but at this time it takes a manual editing of the image and the coding for the CSS placement. In future releases it will have an option inside of a settings page to choose which side.


Andy April 13, 2009 at 5:15 am

Worked fine on another site but on this one it displays down in the footer area when activated. Using the SimpleStyle theme. Had to disable for now.


Chris K April 13, 2009 at 10:39 am

After looking into the SimpleStyle theme, it appears the reason the plugin won’t work with this is they have not created their footer to be completely modular. Their footer is located inside of the actual content area, from what I can gather on their theme coding which means their placement is ‘relative’ and due to this, the plugin is displaying in the relatively placed container and therefore forced to be at the upper left corner of the container it’s placed in, instead of leaving that container. There may be a way to fix this later, but at this time I’d say it’s due to the theme not following very good coding practice and CSS placement.


Andy April 13, 2009 at 3:42 pm

Ok, thank you for taking the time to look at that, I appreciate it. I’ll forward your comment son to the theme designer & see what he can come up with!


Template Lite April 14, 2009 at 1:28 am

I have one suggestion. Add 0px padding and margin for the image:
#updated img{

This is to ensure that there is zero gap between the image and the edges of the browser.


Georg April 17, 2009 at 10:54 pm

@Chris K
That’s great news. I look forward to seeing what you come up with! Thank you.


The-Logic-Solution May 16, 2009 at 4:05 am

why the plugin sometimes shows on my website and some other more times it doesnt appear on the same website??????


Chris K May 16, 2009 at 7:02 pm

@The-Logic-Solution I’ve looked at your site and it looks like the plugin displays on all of your pages. Keep in mind this only displays when there has ben a modification to your site that day. If there have been no updates to your site on today’s date, the plugin will not display.


Joerg Schueler July 3, 2009 at 2:50 pm

I have a great problem. Even when i activate the Plugin it dont work and display at the end of page:
Theme: INOve and the same problem with BlogPimp

Warning: mysql_query() [function.mysql-query]: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) in /mnt/web2/…/wp-content/plugins/updated-today-plugin/updated-today.php on line 46

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mnt/web2/…/wp-content/plugins/updated-today-plugin/updated-today.php on line 46

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /mnt/web2/…/wp-content/plugins/updated-today-plugin/updated-today.php on line 47


Chris K July 3, 2009 at 3:51 pm

@Joerg Schueler
Everything I can find related to this error suggest that you may need to contact your hosting provider or server administrator concerning a possible Database issue. I am running the same theme you are with Inove without error at this time. Some more detail might be helpful. What version of Wordpress, the theme, and also if you have any specific settings you needed to do to get your hosting account to run Wordpress that were different from a standard installation. I’ll be glad to see if I can help you out just need a little more information as this seems very localized to your installation.


Joerg Schueler July 4, 2009 at 2:39 am

First: sorry about my crazy english ;-)

I don’t think it a provider problem becaus it works first time.
Now i deaktivate every plugin and locate the problem with then “ChCounter Widget” Version 2.6.2 by Kolja Schleich http://kolja.galerie-neander.de/plugins/chcounter-widget/

Perhaps you have a hint or alternate for me.


Joerg Schueler July 4, 2009 at 3:21 pm

Sorry. i forgot the WP Version is 2.8 standard installation and inove version is 1.4.5
Thanks a lot for you help.


Chris K July 4, 2009 at 8:20 pm

@Joerg Schueler
Ok, after some further review, it looks like that plugin you are using requires a connection to a separate database than Wordpress’ to do it’s counter calculations because chCounter requires it’s own MySQL database to connect. If you disable only the chCounter does it work fine? If it does then there is your problem. What is probably happening is that the chCouter plugin is running it’s database connection string and then my plugin is running a query, assuming that the only active MySQL connection is the Wordpress connection (as follows Wordpress codex) and so my plugin is trying to query your chCounter database which does not work.


Joerg Schueler July 5, 2009 at 2:21 am

Thanks for your help, now i fix it down to only one error line by adding “$chCounter_force_new_db_connection = FALSE;” to the chCounter Script. So the script use the existing database connection.
Btw. the chCounter database is the same as WordPress used only his own tables.

Perhaps you have a solution for this last error line to fix because my knowing about php and databases is very low.

The last error:
(Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /mnt/web2/41/06/518806/htdocs/joergschueler/wp-content/plugins/updated-today-plugin/updated-today.php on line 47)


Chris K July 5, 2009 at 6:20 am

@Joerg Schueler
That error is getting caught on the following section but specifically line 47:

        global $table_prefix;
        $today = date("Y-m-d");
        $status = 'publish';
        $query = MySQL query removed for length
        $results = mysql_query($query);
47      $num_results = mysql_num_rows($results);

This is valid even according to the PHP manual:

It may be due to the global $table_prefix; if you have not yet defined the table prefix value in the wp-config.php file.


Joerg Schueler July 5, 2009 at 2:58 pm

Problem seem to be fixed and i send you changes code by email.

thanks for your really good support and help.


TeraS July 10, 2009 at 6:35 pm

Just a quick hi and hope all is kk with you Chris! Tera


Wayne July 28, 2009 at 1:40 pm

Thanks for the update Chris. Especially appreciate the new settings page. Great job!!


Paul Moxon August 3, 2009 at 9:13 am

Missing file question mark icon appears in upper left corner.

On Settings page I found this:

Fatal error: Call to undefined function: scandir() in /home/content/ [ ... ] /plugins/updated-today-plugin/updated-today.php on line 88


Chris K August 3, 2009 at 5:13 pm

@Paul Moxon
Can I get some information about what type of server you are hosting this on? As long as it has PHP you should have the scandir() function accessible. Let me know and I’ll see if there is something I can do to resolve it on my end.

Also if you could let me know of the permissions you have on your ‘plugins’ directory.



Paul Moxon August 3, 2009 at 5:57 pm

I have since upgraded to 2.8.3 and no longer see the question mark nor the banner.

OS Linux
Server Apache
PHP v4.3.11
MYSQL v4.0.27-max-log

By permissions do you mean are there other administrators?


Paul Moxon August 3, 2009 at 6:37 pm

Correction: the question mark shows in Safari but not Firefox


Paul Moxon August 4, 2009 at 5:42 am

The new version fixed it. Chris K. rocks!


ma7aba star September 5, 2009 at 5:09 am

very good
but how i can but it in the rigth side


ma7aba star September 5, 2009 at 5:16 am

very good
but how i can but it in the right side


Paul Moxon September 23, 2009 at 11:13 am

Problem returns. Question mark instead of .png graphics in Options (and blog pages).
Deleted plugin from server, then uploaded new copy. No improvement. No error messages. http://thinkletterpress.com/


Chris K October 7, 2009 at 8:47 am

@Paul Moxon

Hey Paul, sorry I missed your comment. Are you still having issues? Let me know I’ll go ahead and see what I can find out. Just email me with any details chris [at] chriskdesigns [dot] com


ma7aba star October 19, 2009 at 11:35 am

Thank you
And is available in Arabic on this link



eko prasetyo January 25, 2010 at 9:10 am

I have a problem. I activate this plugin. All my banner lost, include template banner. Please to help me. Thank you.


Chris K January 25, 2010 at 9:16 am

@eko prasetyo

I looked at the URL you provided http://ekopras.com/ and the banner displays as well as your header. It does appear you need to set the position to ‘Left’ instead of ‘Right’. If you have a different URL you are having issues with let me know.



TeraS April 22, 2010 at 6:23 am

Hi Chris!

Hoping that all is well with you and yours…

I updated to 2.2 this morning and that problem I had in the past with the Mandigo theme and the banner being covered over by the header image has reappeared…




Chris K April 22, 2010 at 8:26 am


Thanks for the info Tera. Glad we got it worked out with you. Modifying the ‘Insert Into:’ option worked for this case. It will still display at the top if you choose footer, it’s simply related to where the script inserts the function. The CSS forces the banner to display at the top of the page. I’ll push an update tonight to better explain this setting.


GeorgWP July 4, 2010 at 4:56 am

Hi Chris,

Nice work. Your plugin keeps getting better and better!

I have a little problem. One of my themes has a fixed width of 960px. If the user’s browser is wider than that – it happens now and then with the big monitors that people have nowadays – the updated image is placed above the background, not above the theme.

One easy solution, I think, would be to add a short code for your plugin. This would make it possible for me to embed it in one of my themes hooks and then style it relative to the container.

Any chance of that?


Chris K July 4, 2010 at 6:19 pm


Hey Georg, what theme is it that you are using? I’ve had this come up from time to time. You might want to modify the Header/Footer option that I’ve included. If that doesn’t work, let me know the theme name and I’ll test against it.


David Patrick October 4, 2010 at 1:58 pm

Hi Chris,

Have had the Updated Today banner installed on the District Website since it first appeared in Wordpress, and it works great.

What I would like to do is move the banner from the edge of the Browser window, and get it to display over the Image that makes up the header of the site and I have no idea of where to start. Do you have any pointers for me to start looking – I am using the new Twenty Ten theme if that helps at all.



Chris K October 4, 2010 at 10:39 pm

@David Patrick
Unfortunately, without heavily modifying the theme hard coding the plugin into the theme, it would prove to be pretty difficult. I will keep this in mind though if I can find a good way to do it, I’ll try and include it in a future update.


san jose chiropractor November 14, 2010 at 1:26 pm

ty :)


Kaori Otani December 7, 2010 at 6:25 pm

Sorry about my English ability.
I use your updated today plugin maybe for 1 year,with “Generic Design 1.0.1″ theme,and it worked until (sorry,not sure)recent day.
I used same theme on 3 blog,but “Generic Design 1.0.1″ seems to be not updated,so I changed one(URL)to “Retromania 1.5″,still doesn’t work and I cannot see any image on setting page.
Now my wordpress is 3.0.2(Jp).
I tried “WordPress Default 1.6″theme,still doesn’t work..

I am not so good at php,but I’ll try.(and same to many Japanese,My English writing is disaster but I can read)As I read backlog,it seems to be difficult,but do you have any idea why your plugin (once worked)doesn’t work?


Chris K December 12, 2010 at 10:24 am

I will take a look and see if I can see what’s going on.


Chris K December 13, 2010 at 6:16 am

@Kaori Otani
I have tested on the Retromania 1.5 theme and the plugin is working correctly. Please make sure that your settings are done properly and are configured to display on new posts and try changing the ‘Insert Into’ option to see if that helps out. If that doesn’t help out let me know what settings you are using and I’ll see if I can duplicate it, but at this time it appears to be settings related. You may also want to try disabling other plugins to see if one that you have added is affecting the display.

I do see that the site you linked in your comment is using the Retromania theme and the plugin is displaying at this time.


Kaori Otani December 17, 2010 at 12:01 am


Thanks for checking my website,and one problem came to my mind in one moment.because you could see banner is displayed.
I’m sorry,It was my security software!!
I use Kaspersky Internet Security,and maybe one day its’ update made unable to see plugin.(with all browser I use)I just disabed security software,so I could see bannerI’m sorry for my too basic mistake.I keep your reply for better configuration.



Chris K December 20, 2010 at 7:16 pm

@Kaori Otani
Thanks for the update. Not sure why Kaspersky would block it but I’ll keep that in mind in future trouble shooting and maybe I can see what’s causing that if I can duplicate it. If you have any other issues let me know.


TeraS July 13, 2011 at 8:12 pm

Hi Chris, there seems to be a problem with 2.4 as follows: On the settings page the banners that are included with the plug in do not appear on that page nor does the banner appear on the site when there is a new post made for the day…




Chris K July 13, 2011 at 8:29 pm

I just visited your blog and it looks like the images are showing. Let me know if there’s something going on I can help out with or if the issue is cleared.


omskaap December 6, 2011 at 1:24 am

Hi there Chris, i’m in absolute need of your plugin for my online shop. Is there any way for me to show “x number of new products added today” instead of the static “updated today” message?


Chris K December 14, 2011 at 4:14 pm


The ‘Updated Today’ is in the image, with some changes to the plugin you could make the banner look different (more of a badge or icon) and write out the number of posts with today’s publish date. That would work fine.


Faisal Humayun January 22, 2012 at 12:10 am

Hi Chris,
Any chance you can update the plugin to be WP 3.3.1 compliant?
Thank you much!


Chris K January 28, 2012 at 8:37 pm


On a stock WordPress 3.3.1 installation using the Twenty Ten and Twenty Eleven themes I have no problems with the banner. What issues are you having with it currently?


Kahil February 24, 2012 at 4:28 pm


Is there a way this can be modified where it could be applied more specifically? As in not just anything being updated, but specifically a custom field or any other specific section?

I use a plugin called Magic Fields 2, which basically just uses custom fields. With the setup I have I would like to be able to be notified when there are new or updated sections on a page without having to search and figure out what is new and what isn’t, etc.



Chris K March 27, 2012 at 4:29 pm


The plugin is always able to be modified, adding in a custom field wouldn’t be too much work, other than just modifying the database query looking for the most recently updated item.


Thomas Nielsen June 7, 2012 at 4:28 am

Thanks for a great plugin!

After the last update I get this error every time I update my site:

Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /home/www/kaffebloggen.dk/wp-content/plugins/updated-today-plugin/updated-today.php on line 74

Warning: getimagesize(http://www.kaffebloggen.dk/wp-content/plugins/updated-today-plugin/banners/updatedkaffe.png) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in /home/www/kaffebloggen.dk/wp-content/plugins/updated-today-plugin/updated-today.php on line 74

And I also have another website with the same problem.

How do I fix this?


Chris K June 17, 2012 at 11:25 am

@Thomas Nielsen

Sorry for the delay, I haven’t been getting updates when comments are sent, I’ll have to look into that.

According to some quick searches this is because your PHP installation doesn’t have allow_url_fopen allowed. You can do this in 1 of two ways.

The first would be to allow it in your PHP.ini file.
Look for a line that say:

Change it to be equal to 1.

If you don’t have access to your php.ini you can ‘try’ and add this to your wp-config.php:
ini_set(‘allow_url_fopen’, ’1′);

Let me know if either of those work.


Thomas Nielsen June 17, 2012 at 1:19 pm

I dont why, but I dont have a wp-config.php file.

But changing allow_url_fopen in php.ini worked.

Thanks a lot, you saved my day! :-)


Chris K June 17, 2012 at 5:06 pm

@Thomas Nielsen,

Great! Glad that worked. Let me know if you need anything else on it.



Ed December 12, 2012 at 12:43 pm

Thanks for your plugin. Works normally great. Unfortunately I had to move the blog to a subdirectory and now it isn’t working. The graphics, banners were not shown. I think you use the wrong config from wordpress for the position of the page. In a earlier version I changed this in your script and it worked. Didn’t thought about it and automatically upgraded and so the changes got lost. Now I moved the banner directory to this subdir you expect, but this isn’t very nice. Maybe you could fix this. Because I like your plugin and don’t want to deactivate it.
Thanks and greetings from Austria!


Chris K December 12, 2012 at 12:47 pm


Sorry you aren’t seeing the Update Today banners on your blog.I haven’t hard of this issue in other sites so far but I’d need a little more information and detail to narrow down the issue. Specifically about this statement:

“The graphics, banners were not shown. I think you use the wrong config from wordpress for the position of the page.”

I’m not sure what “page” you mean or “config” you mean. Are the graphics banners not shown in the admin, or on the front end? If you could copy me the path that’s attempted to load for the images that would be helpful.



Leave a Comment

{ 7 trackbacks }