
This is not as scary as it sounds.
I’m not talking about delving into code of WordPress or anything super-geeky. But a website is essentially a piece of business equipment. If you bought a new copy machine for the office, or a new delivery van, or a security system, you’d have to learn how to use it.
Even if you’ve used similar equipment in the past, there may be some differences, and they can trip you up if you don’t know what they are. Yours may be an established business that had a website before. Or you might have used WordPress before, say to write a personal blog on WordPress.com. There are still going to be differences between your past experience and your new website.
That was then…
In the old days of static HTML pages, your designer created a new HTML document for every page on the site, or maybe for each part of a page, in order to avoid having to re-do the header and navigation on each page.
If you (or your web person) didn’t specifically create a page, it didn’t exist.
This is now…
When you use a content management system (CMS) such as Joomla, Drupal, or WordPress, your content is stored in a database and the CMS generates all of your pages on the fly. Dynamic pages are slower to load than static pages, but they mean that the CMS can create an almost infinite number of different pages (for each blog category or tag, for instance) without someone having to code that specific page.
That means pages (meaning, in this case, each screen you see on a website, and not specifically a “page” in WordPress) can exist without anyone consciously creating them. If you don’t know this, and your designer doesn’t know this, people may end up seeing parts of your website that don’t look the way you want them to. Even if you don’t link to these dynamic pages from your menu, Google will find them unless you block them in your robots.txt file or ask your developer to redirect visitors from that page to a different one.
Here’s how it works.
The appearance of your site–most of what you’re used to thinking of as your site design–is handled by your theme. A theme is a collection of PHP templates, plus one or more stylesheets that contain the theme’s CSS. Many themes also contain JavaScript files to help with certain aspects of display (like setting the height of an element to the height of the browser window).
The PHP templates tell WordPress which content from the database for each content type. These templates generate the HTML you see when you view the source of the page you’re looking at. CSS, which stands for Cascading Style Sheets, governs things like colors, fonts, font size, and positioning of different objects. JavaScript handles design elements that are too hard to do with CSS, as well as doing things like making your slider slide.
Creating Templates
Your developer takes your designer’s mockups (which are usually created in something like Photoshop, Illustrator, or Sketch) and translates them into a theme by writing these three different kinds of code. If you don’t want all of your events, products, portfolio items, and team members to look exactly like your blog posts–and you probably don’t–each type of content needs two template files: single-content_type.php and archive-content_type.php. Event entries need to show the event date, time, and location; team member entries usually need the person’s job title and contact info, products have to have prices, etc.
Once the template has been created, every entry of that type uses the same template. You enter the team member’s name, photo, title, contact info, and bio under Add New Team Member, and WordPress displays each team member based on the single-team-member.php template.
Why do it this way?
It can be confusing, but it actually saves a lot of work. The developer only has to write the code for the team member layout once, instead of every time a new team member gets added. The archive-team-member.php template tells WordPress to show ALL the team members, so you don’t have to worry about updating the page that shows the whole team: WordPress will do it for you.
What if you don’t have a template for a certain type of content?
If you don’t have a single-content_type.php template, WordPress will use the single.php template, which is for displaying single blog posts, or the new singular.php template. If you don’t have an archive-content_type.php template, WordPress will use the index.php template, which is for the list of all your blog posts. (If you really want to, you can see the complete WordPress Template Hierarchy for all the details of template fallbacks.)
How to use this information
Make sure that your designer creates a mockup for the single and archive views of every content type, as well as things like blog comments and comment forms.
If your site is based on an existing theme, make sure you explore the theme demo in detail to see what templates come with the theme. (That pretty much amounts to “Click everything clickable and see what happens.”) The demo will not show all possible types of content, but you will definitely be able to see what a single post, a single page, and list of posts look like.
If you are adding content types such as events or products through a plugin, check the plugin demo page to see what the single and archive views look like. Most of these plugins are designed to fit in with your theme, so they will use your theme’s fonts and colors, but you might want to put things in a different order, or there may be some information you don’t want to display or that you need to add. Send your designer the link to the plugin demo and be sure s/he knows about anything you want added, removed, or rearranged.
Where to learn more about WordPress
There’s a free tutorial at Udemy that provides a good introduction to WordPress, and many books published on the topic, if you want to go deeper. You can also find WordPress classes online (my friend BobWP teaches some), and possibly at your local adult school, community college, or technology salon. Check out Meetup.com to find WordPress enthusiasts in your local area. There are honestly too many sources of WordPress training to list.
Leave a Reply