Weekday plugin
Well … it looks like I’ve created another plugin today. I’m on a roll …
Anyways, this one is a plugin that will add the weekday next to the date …
- If the post was posted today, it will put “Today”.
- If the post was posted yesterday, it will put “Yesterday”.
- Otherwise it will put the actual weekday (i.e. Tuesday).
I had done this in MT and wanted to use it here too. Took a little more finagling than it did in MT because of the way that WP does the date. But it’s done. If you’d like to do this on your blog too, you can get the plugin here.
And to use this, replace …
<?php the_date(); ?>
with …
<?php weekday_date(); ?>
I’ve only got posts from today in my blog so far, so I can’t test this beyond that. So … if you have any problems or questions, please let me know.
Last Updated on: 23 Jun 04 at 12:56pm
Plugin file: weekday.php
Other needed files: none
:: EDIT - 23 Jun 04 9:15am :: There appears to be an issue with this plugin. It doesn’t display “Yesterday” like it is supposed to. I will work on it and post the updated code.
:: EDIT - 23 Jun 04 9:25am :: Took me only 10 minutes to figure out that one (actually less ‘cuz I fixed some other stuff). I’ve updated the code and it should work now.
:: EDIT - 23 Jun 04 12:24pm :: Looks like another issue has cropped up with this plugin. I’ve got it working correctly for “Today” and “Yesterday”, but other than that, it’s just putting either “Wednesday” or “Thursday”. I will be working on it this afternoon to resolve this issue. Please be patient with me. This is one of my first attempts at a plugin. I never said it was fool proof.
:: EDIT - 23 Jun 04 12:56pm :: Okay I think I have things working now. I was thinking too hard trying to fix it. The solution was easier than I thought. The plugin has been updated. Download and try the new code and let me know if it works.
working
WordPress Plugin: Weekday
Here’s a WP plugin that adds the day of the week to your date posted. For example, your posts from yesterday would read Yesterday, June 22, 2004. Posts from today would display as Today, June 23, 2004, and posts from Monday would display as Monday, Ju…
I think I got this plug in to work, but my dates seem off. Oh well.
The plug in says everyday is Thursday??? Help?
I guess I am having the same problem as goodsnake. Except my entries all say Wednesdy.
I am aware of the issue with this plugin right now. I am working to resove it. I will post updated code when I get it figured out. Thanks for your patience.
No problem!
It should be working now. If you have any problems with the updated code, please let me know.
It works! Thanks, Becky!
[…] owNewIndicator(1087998014); Filed under: WordPress Plugins|Google it! Here’s a WP plugin that adds the day of the week to your date posted. For example, your […]
[…] tually knew about but seeing them on Blogging pro, reminded me I needed to save the link) Weekday Plugin Will let you show the weekday (or Today, yesterday, Tuesday, Mo […]
Hi,
I love your plug in, I think it adds that personal touch to a person’s blog. however when I activate the plugin and then try to log out I get the following errors:
Warning: Cannot modify header information - headers already sent by (output started at /home/rachelg/public_html/sunfairy/wp-content/plugins/weekday.php:47) in /home/rachelg/public_html/sunfairy/wp-login.php on line 44….
it continues onto line 53.
Any ideas? If not then thats ok too.
Thanx
Let’s see if I can help you out (sorry it took so long to respond … had company over the weekend and wasn’t on the computer much).
Check the “weekday.php” file and make sure that there are no white spaces after the final “?>”. Scriptygoddess had mentioned this on her site with one of her plugins. I think that was what was causing the error that you are getting.
If that doesn’t work, please let me know and I’ll see if I can figure it out.
Whenever I activate the plugin, I get this error:
Parse error: parse error, unexpected T_VARIABLE in /home/jlee/public_html/blog/wp-content/plugins/weekday.php on line 12
Line 12 is: global $id, $post, $day, $previousday, $newday;
Any suggestions?