Custom Fields in Windows Live Writer

by Lechu on December 4, 2008

wordpress-media-settings I have been using themes which needs to update the thumbnail images in the custom fields. I have been googling for plugins for Windows live writer because I usually use use this tool to do all the posts on different blogs.

After long search I could not find any plugins for this so I need to save every post as draft and edit online.

My solution to this problem

I created a function which will display the thumbnail image of the image stored. As you know in WordPress, every image uploaded creates a thumbnail with a specified image. I need an image sized 70px x 70px. So first I edited the Media settings and set the thumbnail size to 70 px width and 70px height and check the crop thumbnail to exact sizes.

When the thumbnail is created, the name of the thumbnail image file is added with "-70×70".png or .jpg depending on the format you insert.

I wrote a function which will replace the file name adding the "-70×70" to the file name

 
function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { 
$content = get_the_content(''); 
$content = apply_filters('the_content', $content); 
$content = str_replace(']]>', ']]>', $content); 
$content = str_replace('.png', '-70x70.png', $content); 
$content = str_replace('.jpg', '-70x70.jpg', $content); 
echo $content; 
} 
?> 



This function will replace the image with the thumnail image. This function can be added to the function file of the theme

I created a style in the style.css file of the theme

.mythumb { 
} 
.mythumb img { 
float:right; 
max-height:70px; 
max-width:70px; 
} 
<div class="mythumb">
    <?php the_content_limit(150, "");  ?>
</div>
Reblog this post [with Zemanta]
  1. New features of Windows Live Writer : I had done a post related...
  2. Twitter Plugin for Windows Live Writer : If you are using Windows Live...
  3. How to use windows live writer effectively : Every software has its own pros...
  4. Auto Linking feature added to windows live writer : I have just upgraded my windows...
  5. Editing using Windows Live Writer, Multiple pings : I have been using Windows Live...
  • http://www.acs04.fr ACS04

    Hello,
    very good ! I’m going to try it right now as this solution seems to be simple and efficient …

    Jean-Luc

  • http://takien.com takien

    your title “Custom Fields in Windows Live Writer”but you don’t even explain how to add/use Custom Fields from Windows Live Writer.