This is an excellent site for two reasons. One, it is a working responsive design and it is grid based. Two, it has great content. A site “about style, taste and good manners.” Plenty here to peruse if you’re into this sort of thing. Me, not too stylish, and I lack the manners to be confused with anyone of class, but admire those that can pull it off. Wish this weren’t in German, but here’s a translation.
Also, be sure to change your browser window’s size and see how the site responds.
I’m pretty sure I didn’t create this function, but it was one I used over two or three iterations of my site in order to display a page indicator in the style of “1 of 48.”
Pretty simple code:
function get_pagination(){
// $paged - number of the current page - WordPress variable
global $paged, $wp_query;
// How many pages do we have?
if ( !$max_page ) {
$max_page = $wp_query->max_num_pages;
}
if(!$paged){
$paged = 1;
}
if($max_page > 1){
echo ''.$paged.' of '.$max_page.'';
}
}
Not much else to say about it, but it has been useful from time to time.
Since I was recently invited to be an AdPacks.com publisher, I had the pleasure of trying to find a way to integrate the ads tastefully into my site on the top level pages, as well as in individual posts. The current iteration of my site, as well as the last one, really only rely on the single column of content, so I lack a useful sidebar to place ads in; this pretty much limits me to placing ads in the content–well not quite in the content, but in the flow of content really.
So, I essentially needed ads to run after the first post, and only once on any page. In order to do that I needed a simple function that I could run in the WordPress loop, and guarantee my requirements were met.
Thus, the display_ads function was born:
function display_ads(){
global $ad_count;
if($ad_count < 1){
$display = 'AD CODE HERE';
echo $display;
}
$ad_count++;
}
It's quick and dirty but pretty effective. Is there a better way to do this, because this is pretty much the quickest thing I could come up with on short notice? I am legitimately asking you, is there a better way?
I have a couple of friends embarking on a journey of fitness, hell, and betterment. I envy their drive to run long distances and share their desire for physical fitness, but damned if I won’t ever have a goal like they have. No way will I ever aim for a half marathon. I hate running without competitive purposes (yeah, yeah, people run to compete, but that shit is boring). I look forward to reading all about it.
We all grew up as athletes together, once felt young, and hope to recapture that feeling in some way. I’m at a disadvantage, though, I’m afraid. I might be able to maintain or establish some kind of cardiovascular fitness, but my knee is going to forever deteriorate until one day I’ll be half man, half mechanical parts, and that sucks. I wish my knee had never been injured, dammit.
With all of the changes going on in my industry, the improvement and exceedingly common use of responsive design techniques, and my general evolution as a web developer I needed to take a leap forward on my personal site. Hard to sit back and see all that was changing, see my own skill as a developer improve, and not do something. The problem has always been time.
I’ve been sitting on this redesign since at least November, and have scrapped many an iteration since then, but the holiday season kept me busy, and quite frankly I was never going to finish this unless I just launched the thing.
So in all it’s glory this is what it is for now. I’ll be making several changes as I go, improvements in the details, making sure I get everything right, because right now, it’s a hot mess, and adding back a lot of important functionality that I’ve not included in this theme just yet.
This site is tentatively responsive, but not everything plays nicely at this time. I’ll get there, I’m new to this. I’ve based the grid on Joni Korpi’s Golden Grid System, and it’s been modified slightly to accommodate my needs. A lot of my needs, unfortunately, made creating a workable grid kind of tough, but it works mostly.
I have a lot of modification to go through on older posts once I get to adding my archive links and search. I stupidly used a hacky grid in the old layout.
Well, take a look around, let me know what you think.