Archive for the Tutorial

How To Turn off Post Preview in 2.1

WordPress 2.1 has a cool feature such as the post preview. When you save a post or edit a post down at the bottom of the post page you are presented with a preview of your post.
This preview shows the whole page (not just the post text), logo, navigation, everything that is on the main page.
This feature is very useful to preview your post before you publish it. I really like this feature but I don’t always want to use it. However, the thing is with that, my bandwidth has soared considerably. Is there anyway to turn this preview option off ?
Yes, you can turning off post preview feature.
Just open the wp-admin/post.php file and delete these lines (located near line #70 – #73 in WP 2.1):

<div id=’preview’ class=’wrap’>
<h2 id="preview-post"><?php
_e(‘Post Preview (updated when post is saved)’); ?></h2>
<iframe src="<?php
echo attribute_escape(apply_filters(‘preview_post_link’,
add_query_arg(‘preview’, ‘true’,
get_permalink($post->ID)))); ?>"
width="100%" height="600" ></iframe>
</div>

Doing so will save bandwidth, load time, processing time, etc.
Have a great day and gud lak!

Thumbnail Size with WordPress 2.1

WordPress 2.1 has come with some really nice updates, however, like the previous versions, there is still one problem with the images.
I feel the thumbnail image in Wordress is too small for my taste’s and so i need to be able to adjust the image size automatically when uploading into the system. The maximum image was 128px width.
In my older WordPress, I was using before, the size for the thumbnail creation could be changed in the inline-upload.php. You can view my post about How to Resize Thumbnail Image in WordPress. But now, this file has disappeared.
Don’t worry! You still able to edit thumbnail size in WordPress 2.1 The size for the thumbnail creation could be changed in the admin_functions.php.
Just open the file and search for:

$max_side = apply_filters( ‘wp_thumbnail_max_side_length’,
128, $attachment_id, $file );

and change it to:

$max_side = apply_filters( ‘wp_thumbnail_max_side_length’,
256, $attachment_id, $file );

That will double the thumbnail size like mine
The disadvantage from this method is you need to edit “wp-admin/admin_functions.php” file again when you upgrade your WordPress version, because the new “wp-admin/admin_functions.php” file from the newest version will overwrite …