/ Essays

This company - The Design Foundry - was founded in 2004. We have been doing graphic design work -- printed and online -- for many wonderful clients in that time.

Around 2011, a local company that used to do event planning also decided to offer design work, and rebranded themselves as "Design Foundry.

When I contact them and asked them to reconsider the name, their response was "No." They admitted they knew about this company before choosing the name. But the only reason they gave was "We felt that since we weren't using the word "The", it would be fine."

All Bill Clinton "define the word is" jokes aside, let me ask you something. Would you really want to do business with a company that poaches someone else' name? And even if you could forgive that, how much faith do you put in the creative skills of a design business who makes themselves stand out by changing the word "The"?

We've been here for over a decade. And we've been designing materials for this community for over 17 years. We're going to keep doing that. Call us anything you want, so long as your project gets finished.

If you want to know more about the way *we* work, we have plenty of clients who would be happy to share their opinion.

Problem:

I am working on a fairly basic Wordpress-based website. I needed to insert an image in the main area of the page. But it needed to be a randomly chosen image from a pre-defined set, and each image in the set needed to have a unique caption.

There *are* Random Image plugins for Wordpress. But the most common one does not handle captions. And it's image handling is a bit weak for clients who may be potentially lacking in computer skills. And I found some old Random Image plugins that promised to add captions, but were out of date and *only* worked as sidebar Widgets. (I specifically wanted these random images in the flow of main content.) And others still, that offered a single caption for all images.

Solution Overview:

I found that one little feature of a plugin I was already using (Advanced Custom Fields) would allow me, with a little additional coding, to do exactly what I needed.

Tools Needed

Overview

I created an image library in Wordpress, using the standard media manager. I then used ACF to create an array of images for a post. And I then created a custom shortcode -- using the functions.php file -- that selected a random image from that array, formatted it, and inserted it in the page, wherever you place the shortcode.

Details:

Preparing Wordpress

First, upload any images you may want to use, to the standard Media Manager in Wordpress. If you want the image to have a caption, be sure to fill in the Caption field while uploading.

Then, make sure you install the Advanced Custom Field (ACF) plugin for Wordpress. This is quickly becoming my favorite plugin for Wordpress. It does an amazing number of things, that can be used in an even more amazing range of ways.

Also purchase and install the ACF Repeater plugin. Yes it's a paid plugin, but it's cheap and very much worth it. It can allow you to do great things.

Configuring Things

I wanted to allow anyone to be able to edit the pool of images to be used; in a manner as easily as possible. So I wanted to create a repeating 'Image' field on the editing page in Wordpress, for the public, final page in question. The 'Image' aspect allows anyone to very easily upload or select an image, and assign it to the page. The 'repeating' aspect allows the pool of images to be unlimited, while only taking up as much space as needed.

Once ACF is installed and activated, go to the Custom Fields menu item. On the main page, click 'Add New'. On the resulting page:

Name your field group.

Click 'add field'. I labelled mine 'Random Page Image' and set the field name to 'salonphotos'. ('Labels' are the pretty, human-readable part, and 'names' are used in the actual coding.)

Choose the "Repeater" field type.

Go down a couple rows to the 'Repeated Fields'. Click 'Add Sub Field'. Again, give it a unique field label and field name. (I labelled mine 'Photos' and set the field name to 'sphoto'.) Choose the 'Image' field type.

That's it for here. Go to the top of the page and click 'Publish'.

Go to the editing page in Wordpress, for the public page you're working on. You presumably have chosen to have the new tool show up on this editing page. By default, these new tools are directly below the main content box. Click "Add Row", and use the 'Add Image' button to choose a new image from the Media Manager. Repeat this step until you've added rows for each possible image in the pool of Random Images for this page. Then Publish/Update the page.

Now go to the templates for your theme, and open the functions.php file for editing. At the bottom, we will be creating a new function. I will give you the complete code first, and then explain it:

The 1st line -- of course -- just creates a new function and gives it a name.

The 2nd line creates a variable with the Repeater Field's 'Name'. You should change 'salonphotos' to whatever you used.

The 3rd and 4th lines figure out how many items (photos) you have, and randomly choose one of them.

The 5th line gives the chosen photo a variable name, so we can refer to it later. Be sure to change 'sphoto' to whatever you named your image field in the ACF repeater.

The 6th line checks to be sure we actually found something. If not, (meaning there are no photos assigned) it just ignores the rest of the commands.

Lines 7-10 define a bunch of variables, using language from the ACF plugin. It basically grabs the URL of the image you chose, at a size you can define. And it also grabs the caption for the image.

Line 11 just inserts some HTML before the image. This was custom to my needs, and can be modified or left out.

Line 12 creates the image tag, and sticks in the url it grabbed back in lines 7-10.

Line 13 first checks to see if there is a caption, and if so, it inserts it with a bit of formatting.

Line 14 closes the box we started in line 11.

Line 15 closes the conditional statement we used to make sure there were *any* images.

Line 16 will spit out the whole thing into your page.

Line 17 closes the whole thing off.

Line 18 takes the function name from Line 1, and gives it a shortcode name.

That's it.

Now go back to the editing page in Wordpress, where you want to insert the random image. In the main body of the text, paste in the shortcode wherever you want it. If you used the exact names I did, then the shortcode you're pasting in would look like:

[randomphoto]

Results:

If you followed the steps properly, when you look at the public page, you should now see a random selection of image from the pool you chose earlier. And if there was a caption assigned in the media manager, it should also show up.

And once set up, it should be very easy for anyone with even limited computer skills to use. And it's generic enough that you can use it on any page that includes the ACF image repeater tool we created.

Design is not just what it looks like and feels like. Design is how it works.

- Steve Jobs

Human relationships are about communicating. Business jargon should be banished in favour of simple English (or French or Spanish or Chinese or whatever). Simplicity is a sign of truth and a criterion of beauty. Complexity can be a way of hiding the truth.

There are a few tricks to getting a good logo. In this case, when I say “good”, I am strictly referring to the technical nature of the digital artwork, and not the artistic merit nor communication capabilities of it. The basic traits of a good logo file are:
vector format
spot colored
all type converted to outlines

Ask for it

First, tell your client you need the logo. Yes, they probably sent you a GIF off their website. But often they just send you the first thing they can find, because they don’t know any better. So the first option should always be to simply tell them the specifications of good art, and ask them if they can find it in their own company or files.
And occasionally when the logo is from someone other than your direct client, (a sponsor, for example), you can always find their communications department and call them. Explain to them about your project, and ask if they can provide the artwork you need.

Download it

Unfortunately, fewer and fewer companies even keep good copies of their identity package around. But if you’re lucky, and the client is fairly well known or large, you can download their logo. First, check the “About Us” section of their website for a page made just for this purpose. Bigger companies and organizations often have their whole identity standards manual online.
If that doesn’t work, check out Brands of the World, (formerly logos.nina.ru). It is a unaffiliated archive online for vector-format logos from anywhere. Their searching and browsing interface is pretty weak, but their archive is very extensive. Even when you can’t find the exact logo you’re looking for, you can often find a variation on it.

Cheat

Many companies are ignorant of what they actually have in the way of artwork. Or their “regular designers” simply don’t share their files with the client. So a good copy exists, of course, and is being used. They just don’t know it. But thankfully, everyone is obsessed with the internet. So every major document and announcement is posted to a company’s website, and most often in PDF format. Download a PDF of their annual report or similar document, and you can often open the file in Illustrator and grab a perfect copy of their logo.
Don’t know where to find the PDF on their huge corporate website? The easiest solution is to use Google. You go to the “advanced search” section of google, and you can tell it to show you all the PDF files available under any given domain name. It’s amazing what will turn up.

Suck it up

If their logo is bad enough that you really don’t think it should be printed, tell them. Tell them if it can’t be found, it needs to be recreated. And if you really don’t feel up to it, hire me. :) And once you do have a good copy of the logo, do yourself a favor, and start a logo archive of your own.