Warhammer 39,999

Kickin' it Old School

Skip to: Content | Sidebar | Footer

Warhammer39999.com: Now with Pictures!

19 January, 2010 (05:30) | By: Rob™

I’m too proud of myself to contain it.  A few weeks ago, I made a bit of a breakthrough in my blog that made my site look almost professional (at least to me).  Somehow, through a bit of sweat, perseverance, and a whole lot of luck, I managed to figure out how to get thumbnail images for each of my posts on the front page.   Granted, all it really took was a nifty plugin called Get the Image, and a few lines of code, but it wasn’t as simple as plug-and-play.  I actually had to dig in behind the scenes a bit to make the changes. 

Installation of the plugin was easy enough.  After installing it, I didn’t even have to configure it (aside from activating it).  To confirm that the plugin works, I installed the Blog Happens theme, by Chris Happens (wow, I just caught that).  Anywho, once enabled, it worked like a charm.  So, then I just had to figure out how to get the images to show up in my current theme.

If you read through the readme for the plugin (Admin Site > Plugins > Editor > Get the Image), you can see the basics of getting it to work are as simple as one line of code:

 <?php if ( function_exists( ‘get_the_image’ ) ) get_the_image(); ?>

The problem was where to put it.  I found the location inside my theme (Appearance > Editor > {theme_name} > index.php), after the “if have_posts” line:

<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>

Originally, I just pasted the text in and it showed the images; however, it also showed all sorts of other things as well.  This is the part that I’m proud of.  I tinkered around with the code for DIVs to create two different areas in this section: one for my pictures and one for the text, and got them to format all nice and neat.  Afterwards, I mucked around with the styles to show only the sections I wanted to (the title, date, and an excerpt), but left off things like the post categories, time, and author. 

My only previous experience with DIVs was quite ugly—and significantly less successful.  Because I not only figured this out, but didn’t use the might of Google in doing so, I gave myself an A+.  Plus, the blog is starting to look rather snazzy (if I do say so myself). 

To put some icing on the cake, I decided to tinker with my widget headings as well.  That’s done (froma global perspective) through the themes in the CSS page (Appearance > Editor > {theme_name} > style.css).  The code I added was:

#sidebar h2, #sidebar h3 {font-size:1.2em; background-color:#006699 !important; color: white !important;  font-weight:700; padding:0 0 2px 0; margin:0 0 5px 0; border-bottom:2px solid #bbb;}

I learned how to do this from reading a year old post on blog-well.com: Though it’s not perfect, it’s starting to shape up.  In the future, I’m hoping to try to implement images in my widget titles like the guys over at Space Wolves Grey (man, that’s a pretty blog), or at least do some rounded corners on the backgrounds.  We’ll see though… baby steps…

VN:F [1.9.3_1094]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Warhammer39999.com: Now with Pictures!, 10.0 out of 10 based on 1 rating

Related Posts

The Day that OpenID Failed
48 Day Streak & 5 month Recap
Pimp My Ride: Biel-Tan Falcon
The Aftermath: Arctic Apocalypse
Thumblated Related Post
.

Comments

Comment from Max
Time January 19, 2010 at 10:49 pm

Sweet- I've been looking to do a blog reboot but all of the code is really getting me down. This should help out a lot. Thanks!

VA:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VA:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Comment from Warhammer 39,999
Time January 20, 2010 at 5:09 am

Hey, I'm just glad someone's getting something out of it. I know I've been frustrated before, trying to figure out how to make my blog look good, and so if I can do something to help relieve others' frustration, more power to ya'. If you're looking for more ideas, you may want to check out my “website administration” section at the link below:

http://www.warhammer39999.com/category/website-...

VA:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VA:F [1.9.3_1094]
Rating: 0 (from 0 votes)

Write a comment





blog comments powered by Disqus