speaker Multimusen

Search

Video: What is (a) Database & SQL?

July 15th, 2017 by

Create a Stunning Portfolio with WordPress

June 6th, 2017 by
Multimusen's costum front-page.php

Multimusen’s costum front-page.php

For multimedia designer an online portfolio is a must. The industry expect you to have one. But what if you have found a nice open source theme, but you need a really stunning front page? Or a costum gallery for your productions? Or a kick ass CV?

Step 1) Create a Child Theme

The code presented in this tutorial is based on my tw17child. The child theme is based on the Twenty Seventeen theme. The code is available on Github.

  1. Install your open source theme via the Dashboard or by uploading a zip file.
  2. Create a folder with the name of your child theme.
  3. Then create a new file in the folder. Name the file style.css:
/*
Theme Name:   Twenty Seventeen Child
Theme URI:    http://example.com/twenty-fifteen-child/
Description:  Twenty Seventeen Child Theme
Author:       Per Thykjær Jensen
Author URI:   http://multimusen.dk
Template:     twentyseventeen
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags:         one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
Text Domain:  tw17child
*/

As soon as the style.css is ready you’ll be able to see the child theme in the Dashboard. But the styles are not loaded. In WordPress styles and scripts are loaded via the enqueue function in functions.php.

  1. Create a new empty file. Save it as functions.php.
  2. Add styles by enqueue:
/**
* Styles: both parent and child
*/
function my_theme_enqueue_styles() {
  $parent_style = 'parent-style';

  wp_enqueue_style( $parent_style,
  get_template_directory_uri()
  . '/style.css' );
  wp_enqueue_style( 'child-style',
  get_stylesheet_directory_uri() . '/style.css',
  array( $parent_style ),
  wp_get_theme()->get('Version')
  );
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

You can add more scripts and stylesheets to this function if you want to after a similar manner.

That’s it! Your child theme is ready. Now it’s time for your creative tweaks.

 

Step 2) Create Costum Content

Let’s say that you want a costum frontpage:

  1. In the child theme create a new file.
  2. Save the file as front-page.php

Add some content to the page, e.g.

<h1>Hello World</h1>

OK, I admit that this is not the most stunning design, you’ve ever laid your eyes upen. But have a look at your frontpage. It’ll display a “Hello World” as expected. You did not use one line of PHP or WordPress template tags. There’s no loop either.

“What can you deduce from this, Sherlock?”

“The game’s afoot, Watson!”

Actually you can add any code you fancy. You don’t need to follow any restrictions made by the original theme. Now you are able to hardcode a cool splash for your website. If you want to, you can add wp_head() and wp_footer() in the code, e.g.

<?php wp_head(); ?>
</head>

If you do so WordPress will enable the admin bar and add the WordPress head and footer scritpts and styles from the theme.

Step 3) How to name the files

The template hierarchy

Actually you can modify any page or post after a similar manner. The secret is naming your costum files correctly, and here the template hierarchy diagram is the key we need. In the diagram you can find the front-page.php. Here are a few samples:

  • A page for categories: category.php
  • Costum design for a category with the slug icecream: category-icecream.php
  • A post with the slug whatever: page-whatever.php

If you don’t add a loop to the page, you can only use hardcoded content on your costum pages.

Sometimes that’s exactly what we need.

Now you’re able to create a bunch of very personal costum pages for your content, such as:

  • Galleries
  • Animations
  • CV
  • Portfolio pages
  • Costum author pages

 

 

 

Drone hijacked on stage

May 30th, 2017 by

@FrontTrends, Warsaw 2017.

Front Trends Impressions

May 30th, 2017 by

The Front Trends Conference in Warsaw 2017 focused on front end development.

Front Trends Warsaw 2017

May 22nd, 2017 by
Map: Open Street Map, Leaflet overlays, Mapbox costum map.

Warsaw: hotel, and some venues.

We’re on our way to the Front Trends Conference in Warsaw. Five lecturers from the EAAA will attend the conference this evening.

“Front-Trends is one of Europe’s most established annual conferences for professional front-end developers to meet, learn and get inspired.”

Where and SoMe
Some Sparkling Speakers

Many interesting speakers are coming. Among these talks I’d like to hear:

  • Vitaly Friedman “Big Bang Redesign: Smashing Magazine’s 2017” on Wednesday, May 24 at 11:20
  • Sam Bellen “I didn’t know the browser could do that!” Wednesday, May 24 at 12:20
  • Val Head “Motion In Design Systems: Animation, Style Guides, and the Design Process” Thursday, May 25 at 11:50
Airport Links

Are we boarding, or what …

Odyssey.js

May 13th, 2017 by

Odyssey is storytelling via maps and it’s made by markdown and javascript.

Visualizations made via Odyssey.js
Links
Markdown

How to use the theme skeleton

April 11th, 2017 by
Skeleton and implemantation

Finished version with costum frontpage (top) and the skeleton boilerplate (bottom).

In this tutorial you’ll learn how to create your own version of a skeleton theme.

The “Skeleton-F16-Bootstrap” theme for WordPress is a boilerplate, or a place to start, if you want to create a Bootstrap theme from scratch. Or almost scratch that is. The basic files are ready. The top picture is a variant of the theme. The picture on the bottom is what it looks like, if you download the theme as is.

Here are the two versions:

How to fork the code

In order to get started it’s convenient to have your own version of the code. Create a github profile, if you don’t have one yet.

  1. Log in on Github.
  2. Then navigate to the Skeleton-F16-Bootstrap.
  3. Fork the repository.

On your Github page, you’ll find the fork, that is a copy of the original repository. You’ll be able to edit files and upload your own versions of the files. In this way the repository is a starting point for your new coding adventure.

The fork symbol

In order to create a fork click on the fork symbol. Here it’s marked with a fancy red circle.

When you click the fork symbol a new repository is created on your Github space. You can edit all files as you fancy.

  1. Add the forked repository to your Gitkraken (or whatever Github GUI you’re using).
  2. It’s often convenient to save the local files in your  ../wordpress/wp-content/themes/ folder on your localhost.
  3. Pull the files.
  4. Edit a file and save it.
  5. Stage the changes.
  6. Write a commit message.
  7. Push to the repository.

On your own

From this point you’ll be able to create your own markup. If you want to have 6 columns in stead of 3 on large screeen you can fix the Bootstrap / HTML markup. Bootstrap and Jquery will work out of the box. So you can add carousels, accordions and other fancy Bootstrap og Jquery stuff as you please. Since you’re in charge of the markup, you can even create hardcoded menus. You don’t have to do everything in the WordPress way.

The costum CSS editor is enabled in the plugin. You can experiment with styles in the editor. As soon as you’re satisfied with the styling, you can add the styles to style.css.

Costum CSS

Costum CSS: here the text describing an image is changed from centered to left. The font-size is changed too.

The sample code has several branches. The origin master is the actual skeleton. The branch called Multimusen was developed as an implementation of the skeleton for my website Multimusen. Multimusen’s branch has several costum pages, such as pages for categories, or special designed pages like a CV or similar. In this case the CV should stand apart from other pages. The focus should be on the text, so asides such as the sidebar are removed. The markup and PHP for the costum page is found in page-cv.php. I guess that you don’t need a page exactly like this. But if you need one, you can create your own costum templates. Just copy a page template that’s similar. Edit the code, and name the file page-SLUG.php.

In WordPress costum files have a name convention. The system is described in detail in the Theme Developer’s handbook.

In fact: whatever you’re able to do with markup, you’ll be able to implement in a theme. So you can have a look at the Bootstrap grid tutorials on W3 Schools, and even add a Jquery theme after your own choice.

If you want to use JavaScript libraries for animation or parallax you can either edit header.php and footer.php or add scripts via functions.php (don’t do both options!). Adding scripts via functions.php may seem a bit abstract. But it is the best practise.

Here are a few libraries, that’ll add immersive experiences to your WordPress theme:

Whatever you’re able to do with HTML, CSS, JavaScript and libraries – the same is possible in a WordPress theme.

Proceed, and experiment according to your creative vision.