July 7, 2007

7-7-7 - WordPress Hell

Tagged as:

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.

Support

Post Information
david's picture
This article was written by david and published on
July 7, 2007 at 9:49am.
The article was given the following tags:
Comment Information
Jeremy Johnson's picture
Jeremy Johnson
Sep 4, 2007
3:35am

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

Comment Information
david's picture
david
Sep 4, 2007
3:39am

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.

Comment Information
Jeremy Johnson's picture
Jeremy Johnson
Sep 4, 2007
3:44am

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);
}

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

By leaving a comment on this site you agree to the Comment Guidelines.
Spammers please note that "nofollow" tags are used for your website. Spammers, this site is not for you to advertise on. I reserve the right to rename or delete spam links.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
19 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.