Boring meta post

May 15, 2007

Lloyd

I did some changes to the website a few days ago, and I’ve been posting about them in case I ever need to go back and see what I’ve done. Just in case an upgrade breaks something or I have to do another installation. Here are the changes:

1) Comments for the most recent post appear on the main page. This was the hardest to do. There are now two event loops, but the first one just grabs one post and the second one grabs everything but the first post:

[?php $my_query = new WP_Query('showposts=1'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; $withcomments = 1;?]

***NORMAL POST STUFF GOES HERE***

[?php comments_template(); // Get wp-comments.php template ?]

[?php endwhile; ?]

[!--This should grab the rest of the posts. LS 5/12/2007--]

[?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?]
[div id="postbreak"][/div]

***NORMAL POST STUFF GOES HERE***

[?php endwhile; endif; ?]

2) Added the random post seperator between posts. This uses a random image addon. Any of them should work. This one is just a PHP script that sits in a directory with a bunch of images. You call the script as the source and it pulls in a random image. The image is placed via CSS which I haven’t seen before and probably breaks in older browsers.

Shoot, I thought I did more than that, but that’s all that I can remember. Sorry about the boring post.

,

About Lloyd

Lloyd Sommerer is a middle/high school teacher who likes to build websites, read books, grow beards, make fun of Lauren’s prototypes and eat the sauce of the picante.

View all posts by Lloyd

Subscribe

Stay connected as you care to...

7 Responses to “Boring meta post”

  1. Lauren's Mom Said on:

    (? huh?)

    Reply

  2. Brad Said on:

    There’s no babelfish translator for this. What would it be called anyway? “Translate from Geek to English”?

    I did notice the changes though. The separators are pretty. Did you use a sticky note to remind yourself to “Write Separation Proposal”?

    Reply

  3. Lauren Said on:

    As the above post shows, they’ve replaced Lloyd’s heart (and brain) with a robot.

    Reply

  4. Lloyd's Mom Said on:

    Amazing how you figure that stuff out.

    Reply

  5. Peggy Said on:

    [w_h()at:_;//e-v=e()_r; y[o]u:/; ()s/?a_:”y”;-!

    Reply

Leave a Reply