Post to WordPress by Email

17 08 2009

I started posting by email to rforge after loosing content on severel occasions by accidentially hitting the hyperkey on my Thinkpad (which is bound to CapsLock in connection with my Emacs keybindings).

Furthermore I like to post in plain html and the html formular in wordpress is quite tiny. Maybe I have just not found out yet how to get it bigger, maybe even maximized as the WYSIWYG wordpress editor, but using email is ok for me.

After enableing a secret email address for this purpose (Dashboard > My Blogs > Enable) you need to know the shortcodes to embedd categories and tags for the post into the email:

[category x,y,z]
[excerpt]some excerpt[/excerpt]
[tags x,y,z]
[delay +1 hour]
[comments on | off]
[status publish | pending | draft]
[password secret-password]
[slug some-url-name]
[title Your post title]
[end] – everything after this shortcode is ignored (i.e. signatures)


Styling Images in WordPress

26 07 2009

After setting up my own WordPress theme it appeared that images included in posts could not be configured to have the text wrapped around. suggested that one has to add some .css to the theme:

Current versions of WordPress now have image alignment built-in. WordPress adds CSS classes to align the image to the right, left, and center of a paragraph, so the text will wrap around the image.

In order to take advantage of these new CSS classes for image alignment and the text wrapping around the image, the WordPress Theme must include the following in the style.css found in the WordPress Theme directory.

It is not mentioned that the following lines have to be included in the rtl.css too.

img.alignright {
float:right; margin:0 0 1em 1em

img.alignleft {
float:left; margin:0 1em 1em 0}

img.aligncenter {
display: block; margin-left: auto; margin-right: auto}

a img.alignright {
float:right; margin:0 0 1em 1em}

a img.alignleft {
float:left; margin:0 1em 1em 0}

a img.aligncenter {
display: block; margin-left: auto; margin-right: auto}

When adding the image in your WordPress blog, select the image alignment as right, left, or center in the Image/Media Panel.

The image will be embedded into your blog post with the selected style for alignment such as:

<img src=""
alt="leaf graphic"
title="leaf graphic"
class="alignright size-medium wp-image-3109"
height="25" width="30"/>

For more information on styling images in WordPress, see Wrapping Text Around Images.