Category: Multimedia Design
Tutorials for multimedia designers.
-
Create a WordPress Sandbox on Your PC
How to install WordPress on your PC or Mac
When you develop a web site it is often more convenient to work on a local computer.
A) Install the Apache Server MAMP
B) Install WordPress on MAMP
Set up WordPress on localhost
In order to run WordPress needs a server environment with PHP and a MySQL database. Here you have several options. Whether you prefer one or the other does not matter much. Here are a few options, choose one of them:
- Windows: you may use something like MAMP or XAMPP
- Mac: use MAMP
Remember to a directory where you have writing permissions. See these recommendations. - Linux: go for a real LAMP stack, e.g. on Ubuntu try this LAMP solution.
After installing the localhost, you can install WordPress on your local machine. Follow these instructions. If you prefer to follow a video tutorial, here is one more:
Test content
Of course you could write a lot of test content, just to see how every HTML element, any image or whatever works. A better alternative is this: use the WordPress test unit. Here you download test pages, posts and images – and then you will be able to inspect whether everything works as it should.
The Theme Unit Test consist of a xml file with posts, pages, images and so on. You can import them via Tools > Import. You may have to add a plugin in order to import.
In fact this option is very practical. You can import and export content from a localhost to your online WordPress when everything is ready. But first you should try out some themes, and see how they behave with the test content.
In the menu section assign the test menu to the menu location. Now you are ready to see your theme in action.
Try out a few themes
As soon as you have the test content you might want to test a few themes. In the Dashboard go to Themes > Appearance and search for new themes. There are thousands of themes out there, so try to find something that looks like the design you want. In my opinion you should go for an open source theme. Not because it’s “free”, but because these themes have a code-base that’s more easy to change. Often the so-called professional themes have a horrible code, and it is meant to be so. If the user is not confused, how could they continue to sell more solutions?
A Few Useful Plugins
When you have found a good theme, you should add a few plugins. Whatever you choose is a matter of taste, but I’d recommend these as a starting point:
- Jetpack (performance, tweaks, speed and more)
- Akismet (fight spam)
- A page builder, like:
- Elementor
- Page Builder (Site Origin)
- Or just use the standard Gutenberg editor (it is better than most people think).
- For SEO
- Yoast
- The SEO Framework
- Security
- WP Limit Login Attempts
- Webshop
- WooCommerce (very popular solution)
There are thousands of plugins for galleries, portfolios, shops, images and so on.
Create Content
As soon as these things are done, you are ready to create the actual content. When we develop web solutions it is best practise to work with real content, rather than the boring Lorem Ipsum.
In order to avoid confusion do this:
- Delete the content from the Theme Unit Test
- Create real content:
- Pages for static content, such as “About Us”
- Posts for the blog posts
- Add widgets
Remember to use Categories and Tags. It will improve your SEO and give more power to your menus.
When you create the content, try you can try page builder!
Pagebuilding with Gutenberg
You should try out Gutenberg. It has many of the features, that you expect to find in Elementor and friends. WordPress’ new editor was not popular among developers when it was introduced.
The following tutorial is a fine introduction to Elementor by Adam Preiser. If you like the tutorial you can visit his tutorials on https://www.wpcrafter.com/ .
Pagebuilder: Elementor
Elementor is a pagebuilder plugin. You can drag and drop content elements where you want them. And if you have wireframes, you can imitate a basic wireframe in a few minutes.
From localhost to the Web
When your content is ready for production, you will have to export the content and the theme. The theme is separated from the content – that’s why you must do the export in two steps. But first you’ll have to install WordPress on a server.
Most web hotels have a “WordPress in one Click” option. Just create the WordPress site. Give it a name. And you’re ready to go. The next steps are:
- Install the theme (in the same way as you did on the local machine).
- Install all the plugins you want to use.
As soon as this is ready, you go to your local machine. Enter the Dashboard > Tools > Export – and export all content.
Now you go to your online version of WordPress and choose import. Remember to check the box with import media files. If you do so the local images will be copied to the online media library.
Now your site is online, and ready for whatever purposes you or your clients may have.
FAQ
Sometimes things work fine, but now and then we run into troubled waters. In this section I have listed some common problems, we see again and again in the multimedia classes.
Problem: you try to install a theme or a plugin, and get a prompt where you are asked to use FTP.
Solution: Check the folder permissions. Make sure, that the server has write and execute permissions in the folders.Problem: I get a database connection error during WordPress install on MAMP.
Solution: In MAMP the password and user is ‘root’.Problem: I get a database connection error on XAMPP.
Solution: On Windows the user is root and the password is blank. On Mac the user and password is root.Problem: XAMPP crashes.
Solution: Use MAMP … 😉In my experience XAMPP has a steep learning curve, and often errors occur out of the blue.
So if you work on either Mac or Windows I’d recommend MAMP.
-
Summer Hacks
A few hacks for the summer. Some of them are wicked
-
GDPR – and photographers
Data protection is a good thing, however there may be unpleasant surprises in the GDPR. Photos are data, that is personal data. So many photographers are worried – for instance: is street photography illegal from now on?
Here are two voices – a photographer and a business oriented approach to images.
A photographer’s concerns
Below you hear a photographers concerns. For instance can you take a group photo at a party? Actually such a heinous action may be a crime.
Marketing and photos
Below you’ll find a business oriented approach. It’s mostly about marketing and photos. So if you use Mailchimp or similar for marketing it is very relevant for marketers.
Perhaps even this blog post is an evil criminal offence. You see pictures here. Am I allowed to share the links? In some ways the GDPR has good intensions, however parts of the GDPR is lawyer BS.
For multimedia designers there are many concerns here:
- How about images from APIs such as Instagram, Twitter, Facebook, Pinterest?
- Will street photo be illegal in the EU?
- What are the consequences for street, event and similar photographers?
- Surveilance cameras?
At the moment certain countries use the GDPR as an excuse for censorship. Photographs of public spaces, such as monuments may be restricted. So what started as good intensions for data protection created monsters – as is often the case in legislation.
-
Ny studieordning på vej til Multimediedesignerne
Torsdag – fredag mødes ledere og undervisere på Multimediedesigneruddannelsen i Odense for at arbejde med den nye studieordning for uddannelsen.
-
Jsconf in Reykjavik
I’m at the JsConf in Reykjavik. The venue is the fantastic Harpa, with wonderful artwork by Olafur Eliasson. We live in the hotel with the Sky Lounge just across the street.
Today art and code mixed into an amazing creative cocktail. I cannot wait to experiment with the creative libraries from these wizards of code.
Augmented Reality
There were several talks on JavaScriot as a creative tool. Raisa Cuevas introduced to augmented reality, and she introduced several creative tools, such as:
Google ARCore Brings Augmented Reality to Android
https://github.com/google-ar/three.ar.js/tree/master
https://github.com/jeromeetienne/AR.js/blob/master/README.md
Paint Splatter: The making of an interactive artwork
Halldór Eldjárn & Þórður Hans Baldursson introduced the code behind the interactive artwork decorating Harpa this week. On the website http://paint.jsconf.is/ you can choose the colors on the building. They told about the work, and how they wrote the creative code.
Creating generative art with Javascript
Then Kate Compton told about her work as an artist / researcher. She used JavaScript for art. Even her dress was made by JavaScript. One of her bon mots was:
“make things that makes things”
You can follow Kate’s work here: http://galaxykate.com/
Among the tools in her toolbox was https://threejs.org/
The keynote
The first keynote speaker was a nodejs talk, along the lines of this: “version 1.0.4 of XX is not there yet. Please google”. My mind drifted away, but perhaps there were hidden gems for the Nodejs adepts. But at the end of the day JsConf gave many ideas for creative code.
Code is poetry.
-
Scratch for Makey-Makey
Testing Makey-Makey
- URL: https://scratch.mit.edu/projects/191787458/
- Or even better a Makey-Makey Studio: https://scratch.mit.edu/studios/223260/
- Use the SPACE key for the cat.
- Move the elephant with the RIGHT and LEFT “arrow” (i.e. the coin or belt buckle in this case).
What is Makey Makey?
Makey-Makey is basicly a keyboard. The bottom bar is ground, and the others are “keys”. You can use anything that’s conductive as a key. Even fruits, water or your partner.
Scratch Project Inspiration and Tutorials
- Makey Makey Quickstart Guide.
- Scratch Tips: https://scratch.mit.edu/tips.
- Scratch Tips: download as PDF.
-
How to Create a WordPress OnePager
Here’s a short and handy tutorial about the Siteorigin PageBuilder. In Pagebuilder each row will get an id. Then each row will get an id in the Pagebuilder settings.
Now the video does not tell this, but I guess that Pagebuilder will set bookmarks on the webpage, as in:
<h2 id="row-about-us">About us ...</h2>
In the WordPress menu the internal links will be used. The menu will link to #row-about-us, and Pagebuilder will create markup somewhat like in this sample:
<a href="#row-about-us">About us</a>
Now onepagers tend to scroll in a cool slow way. You can do this via some JavaScript. I guess there’s a plugin for it too.
-
Create Your First Underscores Theme
In this tutorial you will learn how to create a WordPress theme almost from scratch via the theme skeleton Underscores.
Download Underscores
- Go to http://underscores.me/ and enter the name of your theme in the input box.
- Then click enter, and you’ll get a zip with all the theme files in a folder.
- Install the theme via the Dashboard in WordPress.
Now you have a very basic theme. There is a menu, but it’s horrible, or so it seems. In fact you’ve got a dropdown menu – so that’s kind of a head start. And that’s the idea of Underscores. From here it’s a matter of styling, but where are the files we need?
Style.css
Have a look in the style.css file. Here your theme name and author is defined. Add your name and the URI to the website, or even better to your Github repository. Since you’re working on a home hacked theme, you may do stupid things. So enter your credentials e.g. (see my sample style.css here):
Theme Name: Abracadabra Theme URI: https://github.com/asathoor/underscores-and-sass Author: Per Thykjaer Jensen and Underscores.me Author URI: https://multimusen.dk Description: The 2017/18 theme for WordPress based on Underscores. Features: SASS, Gulp, Bower, Font Awesome, jQuery. Version: 0.5 License: GNU General Public License v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Text Domain: petj-17 Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, responsive, two-columns, custom-header-image
Sidebar – Content or Content – Sidebar
Since Michael Heileman designed the Kubrick theme in 2004 the standard blog design became something like a sandwhich with a header and footer as the buns. Between the header and footer you’d see some content and a sidebar. So the blog designer could choose between content-sidebar or sidebar-content. Of course you don’t have to do this, but the standard WordPress design still use the magick formula: header.php, footer.php, sidebar.php – and a filename. If there are no other files, WordPress will use index.php as a fallback. All of these files are found among the Underscores files.
Underscores made it easy to create a basic design, with content and a sidebar to the right or left of the content.
Layouts
In the folder layouts you’ll find two files with the CSS for the basic layout:
- content-sidebar.css
- sidebar-content.css
So if you want a classic blog layout, you can copy-paste the content of the one you fancy to style.css. Here is the CSS from content-sidebar.css:
.content-area { float: left; margin: 0 -25% 0 0; width: 100%; } .site-main { margin: 0 25% 0 0; } .site-content .widget-area { float: right; overflow: hidden; width: 25%; } .site-footer { clear: both; width: 100%; }
Now you have a traditional blog design.
Responsive Styles
Of course these styles are not responsive at all. You still have to refine your design with media queries and so on. Since the CSS in media queries are quite redundant a SASS mixin may come in handy (see this sample).
@media screen and (min-width: 100px) and (max-width: 760px) { @include responsive(); // sidebar to bottom body { font-size: 123%; } }
Custom Header Image
The Underscores theme does not support a custom header image. Many themes give you this option, so how do you implement the feature? First you have to add this to the functions.php file:
$args = array( 'flex-width' => true, 'flex-height' => true, 'default-image' => get_template_directory_uri() . '/images/clouds.jpg', ); add_theme_support( 'custom-header', $args );
Then open the header.php file, and add the following where you want the image to appear:
<img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="">
From now on the user is able to choose his own header images from the media. This short sample also demonstrates, that you can edit any file in the theme.
Custom Pages
In WordPress custom pages have to follow a certain naming convention. You can see the system in the template hierarchy.
Let’s say that you want a custom design on the front page. In the template hierarchy you can see that the WordPress will look for the frontpage code in the file front-page.php.
I’d like to design my frontpage in Siteorigin’s PageBuilder. So I need a frontpage that does not interfer with Pagebuilder. And I don’t want a headline. A fast head start is to copy a file and use it as a model. Remove what you don’t want. Add what you need. In this case the result was extremely simple:
get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main"> <?php // the loop while ( have_posts() ) : the_post(); get_template_part( 'template-parts/content', 'frontpage' ); endwhile; // End of the loop. ?> </main><!-- #main --> </div><!-- #primary --> <?php //get_sidebar(); get_footer();
The loop will get template parts from the file ../template-parts/content-frontpage.php. Here is the loop part for the full width PageBuilder content:
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php the_content(); ?> </article><!-- #post-<?php the_ID(); ?> -->
This part of the loop will print the content, but not the headline. If you want the headline feel free to add the_header() and similar loop tags (see this article).
It’s a Theme
With Underscores you’ll learn what it takes to create a WordPress theme almost from scratch. Underscores is the basis of many themes – among them the core WordPress theme Twenty Eleven.
-
Wicked Bad Taste XMAS Theme
So this is Christmas
And what have you done
Another year over
And a new one just begun.
John LennonXmas is a wonderful excuse for bad taste – here’s the new Xmas theme on Multimusen. It’s not completely finished yet. For now it’s just a big screen thing. So if you’re on a mobile device, you’re probably lost.
-
Stephen Raw’s Tolkien Middleearth Map
Imaginary maps: Tolkien