Archive for the 'Word Press' Category

 
Jan 07
Wed
24

Fairly painless

Posted at 8:03 pm in Announcements, Word Press

As I mentioned in my last post, I upgraded my WordPress install to version 2.1. I only had one real issue. The More Smilies plugin that I use made my install blow up. I went to the website for the plugin and found an updated version. Once I installed that, everything was happy. Everything else was small. The Post Comment plugin that I use was counting the pages that I created as posts. I just had to modify the sql statement to only grab posts, and then everything was happy there.

So … all in all, upgrading was painless … as I expected it to be. I ♥ WordPress. :love: :D

Jan 07
Wed
24

Time to upgrage

Posted at 5:40 pm in Announcements, Word Press

I found out over on Matt’s blog that WordPress 2.1 is now available for download. I downloaded it already, and I plan on upgrading tonite after I eat supper. So … The site will be down for a bit while I’m upgrading. But fear not … I shouldn’t be down for long. It’s always been easy to upgrade WordPress in the past. And I’m sure things will be the same this time … as long as I don’t do something stupid. I’ll let you know when I’ve got the shiny new version up and running. I know … you just can’t wait, can you … :G-razz2:

Jan 07
Mon
08

Weekday plugin

Posted at 7:54 pm in Development, Word Press

When I first moved over to WordPress as a blogging platform in June 2004, I wasn't able to find a way to get the date for my posts to display Today or Yesterday. I had been able to when I used MovableType. What I'm talking about is:

  • 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. Monday).

So ... I wrote one of my first WordPress plugins. It's the only one I wrote that I still use.

Download:
Weekday plugin version 1.5

Installation:
Installation is simple. Just unzip the downloaded file and upload it to the /wp-content/plugins/ directory in your WordPress install. Then go to the Plugins page in your WordPress Admin and activate the plugin.

Usage:
In your template where you want to display the date for a post, replace:

<?php the_date(); ?>

with

<?php weekday_date(); ?>

This will display the date for every post, even if there are multiple posts for the same day. This tag must be used within The Loop

You can customize the format of the date, HTML to put before and after the date (i.e. surround the date in a container), and a separator between the Weekday and the rest of the date. You can also specify if you want to display the date or add it to a string and display it elsewhere:

weekday_date($date_format="", $container_start="", $container_end="", $separator="", $echo = true)

$date_format can be anything you want. See the date() function for possibilities.

On this site, I am using the following to display the date:

<?php weekday_date('d M Y','','', '<br />'); ?>

Questions?
If you have any questions about the plugin or any problems, please let me know.

I hope someone out there can find this useful. If you do, please let me know. Leave a comment with a link to your site.

I'm a Redneck Woman
Archives

Search
 
I'm a High Tech Broad
Stats
438 Posts & 75 Comments
Since 07 January 2007

47 queries in 0.313 seconds.
Feeds
Advertising


Meta
BlogRoll
Other Stuff
50% High Tech  50% Redneck
100% Woman
Valid CSS  Valid XHTML
This site looks best in Firefox  This site looks best at 1024x768 or higher
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License
Where You Can Find Me
twitter   flickr   brightkite   infield parking   facebook
myspace   friendfeed   jaiku   pownce   dopplr
Twitter
  • Crap. I don't know if that includes today's calls. CRAP!!! 8 hrs ago
  • Shit. How did I go over my cell minutes this month? Only 17, but still. Dammit. I guess I shouldn't have called home so much today. 8 hrs ago
  • Oh ... I am such a piggy. I ate 2 pieces of pie. 9 hrs ago
  • More updates...

Powered by Twitter Tools.

TwitterCounter for @hightechredneck
Affiliates
HostGator.com Affilliate

Get Smart. Get FireFox!

Get Thunderbird!
Other Cool Sites
kirtsy!
Tag Cloud
Recent TwitPic Uploads