Student Projects and WordPress

Twenty Seventeen
Twenty Seventeen – the code in the core themes is poetry. Unfortunately that is not the case in many freemium-premium solutions. Why?
Why is the code in socalled professinal themes so hard to understand? Multimedia students often face problems if they use freemium-premium solutions.

Right now the multimedia students at Business Academy Aarhus work on their exam projects. During the project they’ll create an advanced multimedia solution for a real life client, that must be “powered by WorPress”.

Since they are creative multimedia users, they want to change a given theme either by CSS tweaks, or more advanced code, such as custom pages in PHP via the template hierarchy.

A few students have tried to create themes from scratch or very basic skeleton themes. They get the cocalled “1000 hour” headstart from Underscores.me.

In this way they had free hands for their creative visions.

Other students go for the popular freemium-premium themes with lots of built in drag and drop options. Such themes are very popular in the business, so working with them is a fine preparation for the life and art of the web designer. But if you think that this choice is cheating or a short cut, think again.

Indeed, some of these self-proclaimed “professional” themes play nasty tricks on the web developer. Basic WordPress functionality, such as custom CSS or other standard WordPress functionality is blocked by some themes!

Often the code in “fremium-premium” solutions is quite hard to understand. Not because the code is more “professional”, but because the developers want to protect whatever they think is a “business secret”. The business model is obvious – if you can’t figure out how to use the “free” theme you have to pay … and that’s what I’d call a booby trap!

Perhaps the beginner should avoid such themes. You may think that you buy support, but in the real world you just pay for more problems! And yeah, you could pay in order to solve these problems too …

So the multimedia designers who used the “professional” themes had to work very hard in order to create the solutions with the tweaks they envisioned.

Often what seem to be the “easy way” or “professional solution” isn’t. Like at all. Most web developers would be better off with a standard no fuzzz theme like the core WordPress Theme Twenty Seventeen, or one of the free themes in the WordPress repositories.

If you want to design posts and pages via drag and drop, perhaps it’s the best choice is to use a standard theme with a good clean and easy readable code, and then add something like Siteorigin’s Pagebuilder to the theme.

At the end of the day you could say that it’s a daunting task to create a WordPress theme from scratch. But when I see the efforts the developers face when fighting with the freemium-premium solutions I have to conclude, that these themes is no shortcut at all.

Use a SASS in WordPress Themes

A SASS mixin can save you from writing hundreds of CSS-lines in your WordPress theme. One of the great features of SASS is mixins. They resemble a function in ordinary programming. You create a series of commands, and pass certain variables. Then you don’t have to write the same code over and over again.

The _S (Underscores) theme is a wonderful tool, if you want to create a WordPress theme from scratch. Here SASS really shines, because you can create a mixin, and pass whatever numbers or settings that are needed. It’s as easy as this:

// tablets: iPads and friends
@media only screen and (max-width: 768px) {
    @include responsive(700px,400px,300px,1.1em); 
}

// mobile
@media only screen and (max-width: 598px) {
    @include responsive(500px,500px,500px,20px); 
}

And so on – in this way you can define the width of any HTML element. The SASS code for this particular mixin is:

@mixin responsive(
    $page,
    $primary,
    $aside,
    $siteTitle
 ) {

#page {
 background-color: #fff;
 max-width: $page;
 margin: auto;
 }
 
 // "wrapper" content container 
 #content {
 @include flexbox(); // prefixes for browsers
 display: flex;
 flex-wrap: wrap;
 }
 
 // content
 #primary {
 width: $primary;
 max-width: 100%;
 }
 
 // sidebar, widgets
 aside {
 width: $aside;
 max-width: 100%;
 }
 
 // site title size
 .site-title {
 a {
 font-size: $siteTitle; 
 } 
 }
 
 // images and media
 img, 
 iframe, 
 .entry-footer, 
 .entry-content, 
 .entry-header,
 .entry-footer, 
 .site-branding,
 .site.title,
 #mast-head {
 max-width: 100%; 
 }
} // end responsive mixin

Perhaps you feel that the mixin code is long. But on the other hand, you only have to write this code once. From now on you can pass variables to the responsive design in just one line:

.someClass { @include responsive(980px,500px,420px); }

Q.E.D.

The WordPress Research Project now on EAviden.dk

Eaviden.dk - the page about my project
Eaviden.dk – the page about my project

Eaviden.dk has published a page about my research project “What You Should know about WordPress”. Eaviden is a web portal presenting the research and innovation activities on the Danish business academies.

On the page you find a description of the project, and links to my research blog (you’re reading it now). The text is in danish.

Here is the link to my project:

Det skal du vide om WordPress

Smashing Magazine tweet about my eBook

Vitaly Friedman and the Smashing Magazine kindly shared the link to my eBook on Twitter.  Smashing Magazine is always a great source of inspiration on everything about coding, design, graphics and UX trends.

WP Workshop @ DigiDays 15.11. 2017

Workshop: News in WordPress4.8 – the REST API,

by Per Thykjaer Jensen

Did you know that you can create WordPress pages in  JavaScript? Or that WordPress isn’t limited to just the browser any more? With the REST API you can fetch the content of your blog native on any device.

But what is REST API and how to use it? Find out – visit my workshop at Digidays at the 15th november 2017 at Business Academy Aarhus.

Click an read WordPress in the Classroom.
The workshop is based on my new e-book.

The workshop is of course based on my new book “WordPress in the Classroom” (see page 98). You can download the e-book for free, and even read it online, click here.

 

Project Status 2016 – 2017

Project Status: 2016 – 2017

Project and impact
Project and impact

From 10:00 I will present the research project in auditorium A @ Sønderhøj 30, Viby, Denmark.

The presentation is the formal end of the research project. I will present the upcoming e-book “WordPress in the Classroom” – and how the research project helped writing the book.

Cover: WordPress in the Classroom
Cover: WordPress in the Classroom

Twenty Fifteen Child Theme

Twenty Fifteen Child Theme
Twenty Fifteen Child Theme

So I’ve implemented a child theme for this research blog. For a while I’ve used Twenty Fifteen, because it’s a blog-oriented theme. But I have to hack some costum pages for the research project. I need pages that map the project, and pages that’ll sum up the proceedings of the present blog.

That’s a job for a child theme!

The code for the child theme is available on Github.