7-7-7 - WordPress Hell

July 7th is upon us, and I've got my new theme up.

Mostly.

It still needs some work (like a few sections of the sidebars and some h2 color issues) but I'm pretty much happy with it. I'm not happy with WordPress, though. On the single.php post page, I had the post's date and time in the sidebar, but those only work in The Loop (what I have in the top section.)

Surely there should be a way of calling the date and time outside of the loop.

I mean, I can call the number of comments, the author, and even the page views outside of the loop, but I can't call the date and time? Something's not right about that.

Anyway, I'll be spending some time over the next few weeks tweaking things, and I may actually see if it looks halfway decent in Internet Explorer. Which means getting rid of the .png images I'm using and making them into .gif's.

Feel free to let me know what you think.

Comments

Jeremy Johnson's picture

Did you ever get the date/time thing figured out? I had to write a custom plugin to pull it from the database and was wondering if there was a better way.

- Jeremy

david's picture

Nope. I just gave up on it (and put it in the box in the entry.)

Haven't looked into how WP 2.3 handles this.

Jeremy Johnson's picture

Ah, well I'll post my solution in the event someone stumbles upon this and needs a solution:

function getPostTime($postID, $format = 'F j, Y')
{

global $wpdb;
$postDate = $wpdb->get_var("
select post_date
from wp_posts
where ID = $postID");

return mysql2date($format,$postDate);
}

Add new comment