Here’s a site I just completed: http://tinyurl.com/cp8p3y (please don’t post the name or real name of the site since I don’t want this to come up on google.)
I’m pretty happy with the site and just thought I’d show it off but also I wanted to point out something cool that I did for the front page:
I wanted the site’s owners to be able to highlight a few entries on the front page if they were special so I created a “*featured*” category that’s excluded from the menus and laid the excerpts for that category out in a rectangle using the page2cat plugin.
But I didn’t want the background image to be the same for each box, since the crinkly paper would loop and look weird (and I wanted it to blend into the background without using PNGs since some browsers don’t like them) so I made this alteration to page2cat.php:
$mycounter = 1;
Then the loop…
$output .= "<div id = 'infobox".$mycounter."'><a href='".get_permalink($single->ID)."'>".$single->post_excerpt."</a></div>";
$mycounter = $mycounter+1;
so the div id becomes infobox1, infobox2, etc, and uses a different background image each time. And if they reduce the number of *featured* entries to below 4 then there won’t be a blank piece of paper; it just won’t put anything there at all.
Anyway, I just thought this was kind of crafty and that someone might want to use it for themselves!
- The topic ‘New website nifty bit of hacking’ is closed to new replies.