How To Easily Make A Glorious WordPress Homepage Complete With Thumbnail Post Images
May 26
Good morning!
Brief, pithy and to the point…
Have you ever seen sites like mine that has snippets of the most current posts along with gloriously exciting pictures and images?
Ever wonder how that was achieved?
I sure did!
See, it all happened like this.
I was happily building up my Success Tactics of the Mama Bear site, when I noticed that my homepage was approximately….382 miles long.
Great content, mind you, but still…
382 miles long.
So!
Having not a clue as to how my glorious designer James managed to get that to work on my site, I sat down, poured 16 cups of coffee and dove right into it.
And guess what…it's really simple to make a WordPress home page that has both your post images and also your snippets!
Here's how.
NOTE! If you need bunches of WordPress tutorials for beginners, check out WordPress Video Tutorials – extremely comprehensive!!
Before You Begin
Need some help with understanding WordPress files? Check out these great tutorials:
Next,
Step 1). Your theme needs to support the WordPress function "post_thumbnail".
The latest versions of WordPress have this ability built into it (all together now, yay!).
It's enabled by the following line:
add_theme_support( 'post-thumbnails' );
into your functions.php file.
Honestly, that's all that's required to make your theme post-thumbnail ready!
Need more help? Go to your WordPress theme directory, make a backup copy of your functions.php (perhaps call it functions.sav), and then open your functions.php file and add in this line:
add_theme_support( 'post-thumbnails' );
That adds the functionality to your WP theme…but now you have to actually display the thumbnails on your site!
Step 2.) Open your WordPress index.php file and place the following within it.
Your index.php is displays your home page.
First, of course, make a backup copy of your index.php – call it index.sav.
Find where in the_loop (that's where your WordPress loops through the default number of posts – if you display the entire content, your homepage too can be 283 miles long as well! For more information, check out The Loop Explained and The Loop Explained For WordPress Beginners) you want to display the snippets and images.
Normally, you'll see a line that looks like:
<p> <?php the_content(); ?>
Change that to:
<?php the_post_thumbnail(array(175,175), array('class' => 'alignright')); ?>
<?php the_excerpt('Read the rest of this entry »'); ?>
That should add the latest snippets and images to your homepage (NOTE! You have to first go to each post and set the Featured Image so WordPress *has* an image to call. It's very easy to do, btw – you should see the option "Featured Image" on the right side of your edit pane now).
Now it's time to tackle the actual displaying of that featured image in your single posts.
Step 3.) Open your WordPress single.php and add the following.
First of course, make a backup copy of your single.php – call it single.sav .
Next, look for the line:
<?php the_content(); ?>
If you want your thumbnail image to be aligned right, add the following right above it:
As you can see, making your site wp_thumbnail-friendly isn't scary at all…it just requires giving yourself permission to edit your own theme and make it so.
You can also make one particular free theme rock by:
Author: Barbara Ling. 17+ Year veteran marketing entrepreneur, currently specializing in teaching others how to build a viral fanbase/community online using Facebook, Pinterest, blogging, coffee (lots of coffee, or maybe tea if that's your preference) and more! See my Google Profile here!
Nice comprehensive tutorial, i was looking for the same to build a wordpress homepage, n your site design is just adorable, it is so amazing, i think you are very creative in designs…..
Thank you so much for this great tutorial. I’ve been looking for this everywhere. But this is the best explanation ever. I am going to bookmark your blog. And I am going to check it from time to time to learn more from you.
Although at the moment I do not have any home pages that are over 300 miles long(maybe 250) but there will certainly come a day when I will need to be able to set up a page with thumbnails. This is definitely one of the most complete and comprehensive instructional posts that I have seen on the subject. I have already bookmarked it. Thank You very much for this post.
"Hey there, thanks so much for stopping by! If you
enjoyed this article, please do feel free to tell your
friends about it or use those nifty neato social icons
above to spread the word. I love sharing great info,
and would really appreciate it...thanks!" -- Barbara Ling
Great post. Step by step is always easy for me to do follow you. Thank you very much
My pleasure, hope it works well for you!
Nice comprehensive tutorial, i was looking for the same to build a wordpress homepage, n your site design is just adorable, it is so amazing, i think you are very creative in designs…..
Thanks for your kind words, Aliza!
Thank you so much for this great tutorial. I’ve been looking for this everywhere. But this is the best explanation ever. I am going to bookmark your blog. And I am going to check it from time to time to learn more from you.
Glad you liked it Mark!
Although at the moment I do not have any home pages that are over 300 miles long(maybe 250) but there will certainly come a day when I will need to be able to set up a page with thumbnails. This is definitely one of the most complete and comprehensive instructional posts that I have seen on the subject. I have already bookmarked it. Thank You very much for this post.
Glad you enjoyed it David!