Category Archives: Website Design

Code faster with Zen Coding

As a full time web developer, I am always looking for new ways to reduce my coding time with helpful shortcuts. We all have our own repositories of snippets and custom code that we often use (you have one too, right?!) but what about the simple things in our coding life that we repeatedly have to type, like the every nagging unordered lists!?

Wouldn’t it be great if there was a simple way that we could generate those lists with just a few keyboard taps? Well, now we can!

Enter The Zen!

Zen Coding is a handy, light weight editor plugin designed for fast HTML coding.  You can also use it for XML and XSL (or any other structured code format).

To learn more about this amazing plugin, find helpful tips and links to download, go to the Sure Fire Web Services and find out “Why Zen Coding is Awesome!”

Update: Cheat Sheet for Zen Coding!
  Since writing this, I have been searching for the best “cheat sheet” for Zen Coding.  I thought I knew a lot of shortcuts… Until I saw this Zen Coding Cheat Sheet.

Happy Coding, Enjoy!


Increase php memory limit for wordpress

The Problem:

If your a blogger and using wordpress on a daily basis you may have run into a virtual brick wall when you saw
“Fatal Error : Memory Size Exhausted”
… or some variation of it!

The Reason:

This is generally caused by you host limiting the default memory usage for php sites. If you have several plugins running, you may get errors when trying to access a widget or in the case of using the ‘Next Gen Gallery’ you may have thumbnail fail to update or display properly.

Increasing the php memory limit will fix nextgen gallery issues!

What it will help:
  • Time out errors when accessing widgets
  • Errors generating thumbnails for galleries
  • Failure to upload images
  • Failure to install plug ins
The Solution: Increase php memory limit

In your .htaccess file (you can access it via ftp) add the following code above everything else:

php_value memory_limit 64M
Alternate Solution:

If you can’t get to your .htaccess file, open up your wp-config.php file (usually on the root of your wordress site) and add the following code as the first line:

define('WP_MEMORY_LIMIT', '64M');

[sws_divider_padding]Some hosting companies will also limit the file upload sizes to 2mb. Generally this is not an issue for most simple blog sites. But when you have a client who needs to upload videos or floor plans averaging around 8mb, this can be an problem!

Rather than explaining how to ftp to your client, add the following code to your .htacces file above everything else:

php_value upload_max_filesize 64M

Now you should be able to work just fine. If you need more memory just increase the numbers above. All hosts have a limit so be aware that increasing the numbers will not guarantee more memory!

Remove WordPress 3.1 Admin Bar

When setting up wordpress sites for our clients, we don’t always want them to have access to certain areas of the back-end, such as the widgets. Allowing inexperienced users widget access can destroy all of our hard work. With the help of various plugins we can limit “editor” level access to our admin area!

This was a perfect solution until WordPress v.3.1!

One of the cool new features (for some) of WordPress v3.1 is the addition of the front end admin bar.

When you are the only Administrator for your site, this makes editing the site a little easier. (I still prefer to get right in the back end).

Although this bar can be toggled on and off via your “user profile” page as seen below…

This only works on a per user basis!

So now you’re wondering how to…

Turn off the admin bar for anyone who is not a site admin!

Simply add the following code you your functions.php file

//remove wp admin bar for everyone except ADMIN
function theR3AP3R_function_admin_bar($content) {
return ( current_user_can("administrator") ) ? $content : false;
add_filter( 'show_admin_bar' , 'theR3AP3R_function_admin_bar');

This will allow only the site admins to see the admin bar on the site!