Raised flower bed – 2017-01-22


Blog changes

I changed the theme of this blog this week from Twenty Fifteen Theme by wordpress.org to the free Customizr Theme. When I started to search a new theme on the wordpress.org site it was overwhelming how much cool templates you can find there. My first thought was to look for a template which fits good to my ideas and adapt it a little bit.  But I realized soon that a new template is more than the installation and the assignment of some widgets. After I tried some templates I searched for a template which is highly customizable. My google searches directed my always to the Customizr theme. So I thought a theme called ‘Customizr’ may be very customizable 😀 .

I decided to use this Theme and stop my search because of the good documentation and examples on the templates website. After I get used to it a little bit I was able to customize the template in the way I liked to. The first step was to create a child-theme and to copy my extension to the functions.php file. My extension adds sentences at the end of a post with the data from advanced custom fields for our sous vide cooking (example: Sous Vide Initial Documentation) which worked without a problem.

The second extension for the template avoids the rendering of the featured image when a post is of the ‘raised-bed’ category. I configured the customizr template so that the featured image is used as thumbnail and if no featured image is set the template uses the last image of the post. The positive aspect of this configuration is that the posts of our raised bed are listed with thumbnail images on the main page. The downside is that the featured image which is shown on the weekly posts is created from the image in the particular posts. The featured images created from my weekly pictures have been very ugly and a unnecessary repetition of the sites content. I used a filter in the functions.php file to avoid the rendering of the featured image on page of category ‘raised-bed’.

add_filter('tc_show_single_post_thumbnail', 'mre_thumbnail_control');
function mre_thumbnail_control($html){
 if(in_category('raised-bed', get_the_ID())){
 return false;
 }else{
 return true;
 }
}

Maybe it is useful to disable the featured images only if the post is of type ‘Image’.

 

Raised bed weekly picture

Raised flower bed – 2017-01-22

Raised flower bed – 2017-01-22

Leave a comment

Your email address will not be published. Required fields are marked *