Resize Image in Blog Posts To Fit Column Width Using CSS

Have you ever added an image to your blog post to find that the width of the image exceeds the width of the column of the page? Here’s a simple fix you can add to your theme’s style sheet to solve this problem. The fix below assumes that you have a class for your blog post entries called “.entry”. This class may be called something different depending on the preference of the theme developer.

.entry img {
max-width: 500px;
height: auto;
}

The max-width: is the maximum width the image can be within the .entry class. In this example the maximum width for an image is 500 pixels. We set the height: auto so the height of the image is auto adjusted to maintain the aspect ratio. Images that are smaller than the max-width will not be resized.

Note that this will not work for Internet Explorer 6 or older.

Plugins 009 – Share This Plugin

Today we’re covering the ShareThis WordPress plugin. The ShareThis plugin adds the famous ShareThis widget to your blog posts and pages. The ShareThis widget makes it easy for your viewers to link your posts and pages on their preferred social bookmarking sites such as Digg, Facebook, Delicious and MySpace and also provides an share via email option.

ShareThis WordPress pluginFeatures Include:

  • Simple ShareThis link with icon
  • Extensive list of social bookmarking and sharing sites
  • Share via Email option
  • Options to add to pages and posts
  • Code snippet to add to your theme
  • Widget you can add to other parts of your web site

The plugin gives you the ability to customize the placement of the ShareThis widget in your theme. All you have to do is add the following line where you want the ShareThis link to appear.

<?php if (function_exists('sharethis_button')) { sharethis_button(); } ?>

To learn more about the ShareThis plugin, please visit the ShareThis WordPress plugin page, http://wordpress.org/extend/plugins/share-this/. To learn more about ShareThis, please visit the official ShareThis web site, www.sharethis.com.

Plugins 008 – WP-DB-Backup plugin

Today we’re covering the WP-DB-Backup plugin and touching on a few other backup tips. With just a few simple steps, you can keep backups of your blog so you can feel confident you’ll never loose data.

Key features in the WP-DB-Backup Pack include:

  • Complete database backups
  • Exclude post revisions
  • Exclude comment spam
  • Backup to folder on server (not recommended)
  • Email backup as attachment
  • Save backup on your computer
  • Schedule backups

To learn more about the WP-DB-Backup plugin, please visit the WordPress plugins WP-DB-Backup page, http://wordpress.org/extend/plugins/wp-db-backup/.

Some other backup tips include:

  • Keep a backup copy of your wp-config.php and .htaccess file on your local computer
  • Occasionally backup the entire wp-content/uploads folder and all of its contents
  • Keep a list of your important plugins handy in case you need to re-install them
  • If you modified your theme, backup the entire theme folder and its contents, typically found in the wp-content/themes/your_theme/

PodCamp Toronto This Weekend

I will be attending PodCamp Toronto this weekend. On Saturday between 2-2:30pm I will be speaking in room 357 on “Setting up WordPress for Podcasting”. If you can make it out to PodCamp Toronto, please feel free to say hello.

Plugins 007 – Special Guest Peter Keung author of Peter’s Custom Anti-SPAM plugin

In this episode, we have a special guest Peter Keung, author of Peter’s Custom Anti-SPAM plugin. During the interview, Peter tells us a little about what he does, gives us the 411 on his plugin and explains why he was inspired to create the plugin. Peter also recommends another plugin for us to check out called SimplePress forum plugin and has some tips for other plugin developers.

To learn more about Peter and his plugins, please visit www.theblog.ca.

Plugins 006 – All In One SEO Pack Plugin

Today we’re covering Search Engine Optimization and the All In One SEO Pack plugin. Remember, a well optimized web site for SEO will help your ranking in search engine results.

Key features in the All In One SEO Pack include:

  • Reorders page titles to optimize search engine coverage
  • Detailed HTML Meta descriptions and keywords
  • No follow options to prevent search engines from indexing pages that contain redundant content such as category and tag result pages

The plugin is developed by Semper Fi Web Design. To learn more about the All In One SEO Pack plugin as well as other plugins developed by Semper Fi Web Design, please visit www.semperfiwebdesign.com.

Instructions how to setup Permalinks are included in this episode. Permalinks, or permanent links, give your blog site friendly URLs for your pages and blog posts that search engines love to see.