Quick CSS for WordPress Images

If you install WordPress and use the media uploader to manage your images in your posts – you can easily style your images quickly by adding the following code to your theme’s stylesheet.

img.alignright, img.aligncenter, img.alignleft {padding:4px;background:#efefef;border-color: #aaa #ccc #ddd #bbb;border-style: solid;border-width: 1px;}
img.alignright {float:right;margin-left:5px;}
img.alignleft, img.alignnone {float:left;margin-right:5px;}
img.aligncenter {display: block;margin-left: auto;margin-right: auto;}

This code will set up your images to float appropriately, as well as give a nice border as seen below.

Christmas in DC

Note* This information is now updated: Updated CSS

WordPress 2.5 Beta 1: One Click Plugin Updates!

On my company blog, I blogged about my initial thoughts on WordPress 2.5 beta 1. I have since then updated to WordPress 2.5 beta 1 and have been pretty darn happy with it so far. All my plugins on jappler.com made the upgrade without any issues and this morning when I logged into my web site, I noticed that one of my plugins had been updated since I last logged in and with WordPress 2.5 – you now have the ability to do “one click” installs. You need to provide WordPress with your FTP user name and password, and with that, you can have WordPress manage your plugin updates. No more manual downloading, uploading, etc… Nice work WordPress team! Stay tuned for more WordPress 2.5 related posts.

Internet Explorer and Custom 404 Page Issues in WordPress

Has anyone else seen the issue where you have created a 404 (or not) for WordPress and when you show links to posts or pages in WordPress that are marked as private – IE users intermittently get the generic IE 404 page? I cannot figure out how to fix this. Any thoughts would be appreciated! The HTTP header that the page (password protected) produces is a 301.

Basically – I have a custom 404 template that says “if is logged in show “file not found” and then a link to the search form. If you are not logged in, show a login form – as this takes care of the logic 99% of the time. This setup works 100% of the time with Firefox and Safari – but IE barks at it randomly. (If you refresh – you see the correct 404 text within 2-3 refreshes). What is going on?

Jappler Menus in WordPress

Awhile back, I put something together (sons of suckerfish and sliding doors) and then was recently asked how to get this to work dynamically in WordPress.

The key to getting this to work dynamically is to first choose how you want to organize your site. I have done numerous sites based on categories and a lot also done using pages. Once you figure out what you want your menus to be driven from (page hierarchy or category hierarchy) you can then use some built in WordPress functions to dynamically fill out your menus.

For categories: you will want to use the wp_list_categories function
Example: (using the CSS and JS from the article I posted previously)

<div id="nav">
<ul>

</ul>
</div>

With that example, you can exclude certain categories, and their will not be a “Categories” text as the first level of the list. For more options, check out the wp_list_categories documentation.

For categories: you will want to use the wp_list_pages function
Example: (using the CSS and JS from the article I posted previously)

<div id="nav">
<ul>

</ul>
</div>

With that example, you can exclude certain pages, and their will not be a “Pages” text as the first level of the list. For more options, check out the wp_list_pages documentation.

There is also another option (plugins) I have used that extends both of those functions: Fold Category List, Fold Page List.

apache, mysql, php update.

Finally after two years of contemplating the updates to Apache 2.x, MySQL 5.x, and PHP 5.x, I finally updated my server to the latest version os Apache, MySQL, and PHP. I was not too concerned about custom work or any of my WordPress sites, but I was concerned XOOPS and/or XOOPS modules would have some problems, but it is now a week later and everything is running smoothly. Why finally? Well, as of the end of this month, support for PHP 4 will be discontinued. Better late than never. Time to update your servers too?

a new wordpress user.

My cousin asked me last week about what it would take for him to get a web site that could be easily updated and flexible for growth and of course I pointed him towards WordPress.com. I figure he could learn the ropes there and then when he was ready for something a little more, I would create a custom WordPress site for him. Best of luck Robert!

WordPress Jobs

I was approached a few months ago with a project that sounded like a great opportunity: to design the UI and logo for the new WordPress Jobs web site (which my company does about 90% overall business on WordPress development). If you missed the announcement for the site, check it out. If you need WordPress consulting, you could go to the site, or you could go to the company who helped build the site ;).