Web design tips

With technology changing all the time, you’ll have to learn constantly to keep up to date with the latest trend.

Add a Google +1 button on your site
Published on May 22nd, 2011

Adding Google’s latest sharing tool to your site is very easy, all you need to do is to go to Google Webmasters Tools, specifically on this page. There you can choose your button size and take the necessary code to add your button.

Display ads to Internet Explorer users only
Published on May 22nd, 2011

Internet Explorer users are often the ones that care the less about using a good browser or about the web designer’s development time. If you want to give them extra ads to punish them for using that browser, here is how to do it, insert the following code in your web page:

Download wordpress using ssh and svn on a remote server
Published on May 22nd, 2011

For this tip, you need to know how to connect to your server through SSH, if you don’t know take a look at this post (it’s the source of this tip). Once you are connected to your server using SSH, just enter the following command:

Redirect root URL to subdirectory using .htaccess
Published on May 22nd, 2011

To redirect you main URL to a subdirectory, simply use the following code in your .htaccess file. RewriteEngine on RewriteCond %{HTTP_HOST} ^example\.com$ RewriteRule (.*) http://www.example.com/$1 [R=301,L] RewriteRule ^$ store [L]

Changing the excerpt length in WordPress
Published on May 22nd, 2011

To change the excerpt length in WordPress, it’s quite simple. Edit the functions.php file in your theme, then add the following php code: add_filter(‘excerpt_length’, ‘my_excerpt_length’); function my_excerpt_length($length) { return 20; }

Use page templates for custom page layouts in WordPress
Published on May 22nd, 2011

Getting alternate layouts for your WordPress pages is quite easy, for that just duplicate the page-custom.php file. Make all the changes you need in that file and add the following code in the top of the file.

How to add the official tweet button in WordPress
Published on May 22nd, 2011

Adding a “Tweet me” button with a counter in WordPress is quite easy with the button generator offered by Twitter itself. Then you can use this code.

Make your WordPress install faster by removing unnecessary plugins
Published on December 24th, 2010

If you find that your WordPress install is running too slow or using too much memory, one easy way to release the weight on your server is to uninstall plugins. Many plugins functionalities of plugins can easily be replaced by updating your theme’s functions.php file.

Custom Add to Cart button on CMS page
Published on December 24th, 2010

Magento provides an easy way of adding products to shopping cart via query string. To create a simple add to cart button on any magento’s CMS page open it in WYSIWYG editor and the following HTML to its contents: <p><button onclick=”location.href =’{{config path=”web/unsecure/base_url”}}/checkout/cart/add?product=1&qty=1′”>Buy It Now</button></p>

Change Admin URL
Published on December 24th, 2010

By default magento admin panel is accessible via http://example.com/admin URL. For security reasons, you may want to change it into smth like http://example.com/sighO_0 In order to do that edit magento’s app/etc/local.xml file and replace <frontName><![CDATA[admin]]></frontName>