
Blog Happens: Free Wordpress Theme
The Wordpress theme I use with this blog is Blog Happens, created by Chris Happens (aka iMenn). It requires Get-the-image plugin to make the theme work perfectly. For easy installation, iMenn included this plugin into the same package (zip file) with the theme, so there’s no need to download the plugin separately.
Get-the-image plugin included in Blog Happens theme package is version 0.2 which work perfectly with the theme. But, Now this plugin is updated to version 0.3.2. I (and my friend, @ohm4u) updated it and encounter a big bug.

ohm4u
Normally, Get-the-image plugin takes image in the post and make it as thumbnail in index page. For the post which has no image, the plugin uses default image as thumbnail. After I updated the plugin to v0.3.2, there’s no thumbnail showing for the post which has no image. This bug annoy ohm4u and he decides to fix it.
Here is how he fix it. I’ve applied this method with this blog already. It works!
in the file “index.php” of Blog Happens theme, Line 11 is showing like this.
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php if(function_exists(‘get_the_image’)) {echo get_the_image(array(‘Thumbnail’,'My Thumbnail’),’thumbnail’,get_bloginfo(‘template_directory’).’/images/thumb.jpg’);} ?></a>
Replace Line11 with this code
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php if ( function_exists( ‘get_the_image’ ) ) { get_the_image(array( ‘custom_key’ => array( ‘Thumbnail’, ‘thumbnail’ ),’default_image’ => get_bloginfo(‘template_directory’).’/images/thumb.jpg’ )); } ?></a>
If you use “page-blog” page template, do the same thing in “page-blog.php” Line 23.
Thanks @ohm4u for this helpful solution.
Blog Happens theme : http://www.chrishappens.com/sharing/bloghappens/
Chris Happens : http://www.chrishappens.com/
iMenn : http://www.imenn.com/
Get-the-image plugin : http://wordpress.org/extend/plugins/get-the-image/
Ohm4u on Twitter : http://twitter.com/ohm4u
Ohm4u as Sonarboy : http://www.sonarboy.com/

โอ้ ขอบคุณมากๆ เลยครับ ว่าจะแก้หลายที ก็มัวยุ่งและไร้สาระอยู่
ขอคารวะ 1 จอก
โอ้… เยี่ยมมาก บันทึกเอาไว้กันลืม .. ทำไปทำมา เดี๋ยวลืมหมดอีก
ขอเพิ่มเติมหน่อยครับเฮีย..
เนื่องจาก Code ที่เฮียแปะเอาไว้นี่ ไม่สามารถที่จะ copy/paste ได้ เป็นที่เครื่องหมาย ” ‘ (ซึ่งไม่เข้าใจเหมือนกันว่าทำไม) ถ้าใครเจอปัญหา ไม่ทำงานอย่างที่ควรจะเป็น ให้แก้ที่ เครื่องหมาย ” ‘ นะครับ ให้พิมพ์ใหม่ทั้งหมด…
อย่างที่ 2 คือ Code ที่จะเอาไปทับของเดิม สามารถย่อให้เหลือเพียงแค่นี้ได้ครับ…
array( ‘Thumbnail’, ‘thumbnail’ ),’default_image’ => get_bloginfo(‘template_directory’).’/images/thumb.jpg’ )); } ?>
ปล.ถ้า comment นี้มีปัญหา เนื่องจากการเอา code มาใส่ ช่วยจัดการแก้ไขให้ด้วยนะครับ
^
^
เห็นมั๊ย จริงๆ ด้วย Code ไม่แสดงตามที่ควรจะเป็น … แก้ให้ที..
ช่วยส่งเป็นไฟล์โค๊ด เป็นแบบ txt มาให้ได้ที่ pilomcity[]gmail.com หน่อยครับเนื่องจากคัดลอกโค๊ดไปแล้วใช่งานไม่ได้ครับ เพราะว่าไม่รู้จะเอาเครื่องหมาย ” ‘ ไปวางตรงไหน