AW28 Working with WordPress themes

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

In the WordPress repository, you can find thousands of themes. Some themes are developed for a spesific usage, and some are so-called “multi-purpose themes”. Astra, which I use on many of my installs, is a multi-purpose theme. After installing a theme you may discover that the theme needs tweeking, either in layout or appearence. Some themes offers ways to change elements on the site through the customizer, others don’t, but the key lesson here is that if you do changes to the theme and the theme later is updated, your changes are lost. That is why we use child themes.

A child theme is a dependent theme that depend upon it’s parents. Every template of the parent theme can be overridden in a child theme, and a well written theme also allows you to change functionality. A child theme consist at the bare minimum of a folder and 1 file; style.css. In the style.css, you override the parent’s style. You may also include a functions.php, where you write all functionality code related to your look’n feel of your site, . In order to make a theme, you need a theme header. A theme header has at least one line of code, the theme name, but often a theme has more information in it’s header. A child theme also has the template definition, which is the folder name of the parent theme’s folder.

 /*
* Theme name: Here you write the name of your theme
* Template: folder-name-of-parent-theme
*/

There are two ways to create a child theme: by creating the necessary files and folders yourself or by using a child theme generator. There are a handful of those online and Astra provides it’s own.

If you have the required skills, you can develop your own theme. Thie WordPress Codex is a good starting point for theme development.

More to explorer

AW33 Point of sales

A point of sales, or a point of purchase as it is sometimes referred to, is how your product is displayed in a sales location – a kind of exhibition

AW32 Branding and Packaging

Everywhere around us are items packed in something. Every item has it’s own set of requirement for the surrounding package, and a package has to be design around what it

AW31 Infographic and brochure

In this project part, the goal is to explore the visual language of a piece and create to coherent designs: one infographic and one brochure that has a common look’n