Categorized | Tutorial, Wordpress

An Easy Way to Create Thumbnail Post with Timthumb and get image Function

So that our blog looks more interesting, We can add a thumbnail post on every post we write.

Follows an easy way to display the thumbnail post on our posts:

1. Download File timthumb.php from HERE or here.

—> This file contains the code to resize the images that we upload and store it in “cache” folder.

2. Create a new folder under the theme folder and name = scripts.

3.   Then upload file timthumb.php into folder scripts.

4.  Also create a new folder under scripts folder and name = cache. Make sure you give 777 permissions to the cache folder.

5. Add this code into your function.php file .


Or you can download the file HERE if your theme don’t have function.php yet, then rename to be function.php and upload it under your theme.

6. Add the following code in the index.php or home.php to display thumbnail pictures post before the content of post (the_content() or the_excerpt() ).

Finish !!!

If you do it right, then will you find such a post thumbnail image above.

Note :

Do this experiment at a local wordpress server machine.
Do backup file (theme file) before doing this experiment

Good luck
Hopefully helpful.

One Response to “An Easy Way to Create Thumbnail Post with Timthumb and get image Function”

  1. Ken says:

    Nice post.

Trackbacks/Pingbacks


Leave a Reply

*

Our Partner

Our Partner

Update ESET Nod32

Update 11322, 15 Mar 2015

Update 15 Mar 2015

~ For Eset All Version, OS XP, Vista dan Win7