Warhammer39999.com: Now with Pictures!

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…


2 comments on “Warhammer39999.com: Now with Pictures!

Have something to add?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s