Different Sidebar Content on Different Pages in WordPress

Ok, this is an old one and easy to do these days with free WordPress plugins but here’s an alternative method of having different sidebar content on different pages in WordPress. It involves a little bit of adjusting of the default sidebar.php template file. I’m using the sidebar template from the default Twenty Twelve theme here.

Here’s the edited code:

<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<div id="secondary" class="widget-area" role="complementary">
<?php if ( is_page('home') ) { echo "Home Page sidebar content'";
} elseif ( is_page('about') ) { echo "About Page sidebar content'";
} elseif ( is_page(contact') ) { echo "Contact Page sidebar content'";
} else { dynamic_sidebar( 'sidebar-1' );
} ?>
</div><!-- #secondary -->
<?php endif; ?>

Basically, what the above code does is tells WordPress via some if/else PHP statements to show different content depending on which page you’re on and if you are not on any of the pages mentioned, just show the default sidebar. The “if is page” bit can be the Page ID, Slug or Full name. I’ve used slugs in the example above. You need to get the spellings exactly right.

Leon

How To Replace the Heating Element on your Beko Tumble Dryer

Our Beko Tumble Dryer went tits up after just over a year usage from new. The warranty had just expired and money was a bit tight to hire an appliance repair guy so I Googled around and armed myself with enough information to be confident of the problem diagnosis, spare part required and replacement process involved. I sourced the part from SpareParts.ie (took a while as spares aren’t usually available for newish models) and went about replacing it as outlined below. The whole process took about 30 mins.

I am gonna guess the process is roughly the same for most tumble driers but my model is the Beko DCU9330W.

Here’s what a Heating Element Assembly looks like for my dryer at least. There’s heating coils inside the box and Thermostats/Thermistors on the top to regulate temperature. These can blow but can’t be easily replaced on their own without the full assembly:

Beko Heating Element Assembly

Step 1:

Unplug the machine! Remove the ton of screws holding the funny shaped back plate on. Locations as below. The screws are all a little different so take note which ones go where. I put the screws on the counter in the same rough shape as the back plate to easily remember.

Back Cover

Step 2:

Remove the top cover of the machine to give access to the heater element connectors inside. There’s 3 screws at the back on my model holding the top cover in place. You can now disconnect the 2 connectors as marked below (plus cable tie) and pull the cable through from the back:

Connectors

Step 3:

Replace the heating element unit. There’s 3 screws at the top of mine and when removed the unit slides up and off easily. Reverse the process to add the new unit and feed the cables through the hole to the left for connection inside the drier as above. Replace any cable ties removed when taking out the old heater to prevent cables causing problems for the drum.

Heater Unit

You’re welcome.

Leon

Chrome Extensions for Web Designers

I stalled on using the Google Chrome browser for quite a while because of my dependency on Firefox plugins despite me hearing how great and how quick it was over other browsers. I’m happy to report now that there’s quite a lot of extensions for Chrome these days, especially for web designers and developers. Here’s a few I can’t live without:

 

BuiltWith Technology Profiler

Shows a list of technologies and frameworks used in the website you’re on, ie php, css, etc..

 

Web Developer

Enables all sorts of overlays and functions helpful while building a site or analyzing an existing one’s structure.

 

Pendule

Similar to Web Developer above but a bit simpler and more pared down.

 

Firebug Lite

A Lite version of the popular Firefox website inspection tool.

 

Analytics Helper

Detects via the address bar if Google Analytics is installed on a web page and provides the “UA” ID on hover.

 

PageRank Status

Provides info on Google PageRank, Site Location, IP address, Bing & Yahoo backlinks, etc..

 

META SEO Inspector

Shows META/SEO info on a site.

 

WhatFont

Identifies the Font used on a website or certain sections of a page.

 

Window Resizer

Show how a site looks in different window sizes and resolutions. Create you own sizes.

 

View Background Image

View the background image of a site or page element via the right-click content menu.

 

Site GEO IP Locator

Shows the location of a site’s hosting server.

 

Image Properties Context Menu

Adds an “Image Properties” entry to the right-click context menu which shows info about a website image such as dimensions, filesize etc.

 

Google Global

Runs a Google search through Google Ireland, UK, USA, Canada or Australia.

 

Chrome Sniffer

Shows used website technologies and frameworks in the address bar. Named on hover.

And some cool non-web design related extensions too:

 

Rapportive for Gmail

Finds a person’s social network profiles and other info about them based on their email address and lets you connect with them from within Gmail.

 

RSS Subscription

This adds an RSS identifier and subscription button to Chrome cause it still doesn’t have it’s own by default!

 

Screenleap for Gmail

Share your computer screen through Gmail.

 

Unsocialize

Right click links in Facebook etc and choose “Unsocialize” to avoid having to go through apps to see content.

You’re welcome.

Leon

Photoshop Human Shadow Study

Adding shadows to simple objects in Photoshop is no big deal but adding them to irregular objects like people with awkward stances can be a bit tricky. Here I outline simply how I normally do it.

Assets

A decent hi-res image of a person against a neutral, single colour background.

Process

I bring my image of a girl into Photoshop and cut her out of her background using the Pen tool. I’ve just started using Vector Masks so when finished tracing her outline with the Pen, right-click inside the outline and select “Create Vector Mask”. Make sure you’re not working on a background layer for this. Creating the Vector Mask will automatically cut out the object and leave the rest of the image transparent which is what we need here. The benefit of using a Vector Mask is that you can go back and adjust the Path/Shape at a later stage. Handy sometimes.

Once the girl is cut out, I duplicate her layer and rasterize it to remove the vector mask then using the Transform – Skew or Distort tool, I drag the duplicated layer to the rough angle and shape that her shadow would be, paying particular attention to the light source in the photo. Once you’re happy with that, darken this layer totally using Hue/Saturation. You might find after Transforming that the feet don’t line up properly with the shadow so using Transform – Warp, drag things back into line.

Next, add a Layer Mask to the shadow layer and apply a Black to White gradient along the direction of the shadow with black at the feet and white at the head. Next, apply some Gaussian Blur (about 10 radius depending on photo resolution) to the shadow layer and make a rectangular selection over the top half of the shadow, Feather it about 100px and apply more Gaussian Blur, this time about 30px radius. These steps give the shadow a more non linear and realistic look, fading and softening the shadow the further from the subject it is.

Finally some tidying up around the feet in the original layer where they meet an invisible floor by painting in some under-shoe shadow on a new layer with a very soft Black Brush. Change the opacity on both this and the shadow layer to about 85% to soften a little.

And yes, it is more fun to work on images of sexy girls..

Final image:

Girl Shadow

How to Increase the WordPress File Upload Limit on Shared Hosting

The upload limit on my clients shared hosting is a measly 2MB which in this day and age is pretty useless as it wouldn’t allow for uploading of most media files, in particular Audio & Video. There are several workarounds, most of which I tried but the following is the only one that seemed to work for me.

Right-click your desktop and select New – Text Document and copy and paste the following lines into the new file:

upload_max_filesize = 32M
post_max_size = 32M
file_uploads = On

You can change the 32M to whatever you like but don’t go mental. Keep disk space in mind!

Next, save the new file as “php.ini” and upload it to the “wp-admin” folder of your WordPress install via FTP or your hosts File Manager.

If you now navigate to Media – Add New in the WordPress admin, you should see 32MB mentioned as the max file size at the bottom. See below:

Media - Upload

Christmas Song Lyrics & Chords

Been meaning to get a collection of these together in case there’s any music sessions going on around the place over Christmas.

Here’s a list of 18 popular Christmas songs and Carols that we’ve all come to hate with full lyrics and chords for you to play and annoy with:

Download Xmas Chords (Zip file with PDFs)

  1. Auld Lang Syne
  2. Away In A Manger
  3. Christmas Song (Chestnuts roasting..)
  4. Deck The Halls
  5. Do They Know It’s Christmas
  6. Feliz Navidad
  7. God Rest Ye Merry Gentlemen
  8. Jingle Bells
  9. Let It Snow
  10. Little Drummer Boy
  11. O Come All Ye Faithful
  12. O Holy Night
  13. Rudolph The Red Nosed Reindeer
  14. Santa Claus Is Coming To Town
  15. Silent Night
  16. We Wish You A Merry Christmas
  17. White Christmas
  18. Winter Wonderland.

Web Design Partnership with GoodSeedPR

I’m pleased to announce a wee partnership with a long standing music public relations client of mine, GoodSeedPR whereby I will be their Website Design and Photo Editing/Graphic Design ‘wing’!

We hope to work together to bring affordable design services and complete internet marketing packages to up and coming musical acts and others.

Leon

Reverb-Goodseed