WORDPRESS in the CLASSROOM by Per Thykjaer Jensen
Total Page:16
File Type:pdf, Size:1020Kb
WORDPRESS IN THE CLASSROOM By Per Thykjaer Jensen Published by Business Academy Aarhus, Research and Innovation department. Erhvervsakademi Aarhus ForskningWORDPRESS og Innovation IN THE CLASSROOM – PART ONE Published by Business Academy Aarhus, The Research and Innovation department, August 2017. Research and innovation publication #7 We work with applied research, development, and innovation that create value for educational programmes, companies and the society. Read more about our research and innovation projects: http://www.eaaa.dk/forskning-og-innovation/projekter/ The publication is published as a part of the research project “What You Should Know About WordPress”. Research blog: research-wordpress.dk/ TEXT AND CONCEPT Per Thykjaer Jensen, Senior Lecturer and Project Manager, Business Academy Aarhus, The Research and Innovation department. Contact: [email protected], tel: +45 7228 6321. Twitter: @pertjensen URL: http://research-wordpress.dk/ EDITORS Ulla Haahr and Karina Hansen, Business Academy Aarhus, Research and Innovation department. PROOF READERS Bror Arnfast, Senior Lecturer, Business Academy Aarhus. Mark Hughes, Senior Lecturer, Business Academy Aarhus. LAYOUT René Kristensen, Business Academy Aarhus. ISBN 978-87-999767-2-0 COPYRIGHT Creative Commons License: Attribution-NonCommercial-ShareAlike 4.0 International WORDPRESS IN THE CLASSROOM 3 Contents Part one: Making WordPress What You Should Know About WordPress 12 The History of WordPress 14 The Core-Themes 16 Themes: 2010 – 2017 19 Themes as Visions for WordPress 30 Anthropology and Open Source 32 Artefacts 33 Espoused Values 35 Basic Assumptions 39 The Prelude on Github 43 Schein, Organization and Development 48 4 WORDPRESS IN THE CLASSROOM Part two: Diving Into Themes The Theme-code 52 Partial Conclusion 78 Theme Building Blocks 53 Why you need a child theme 80 Three important files 54 How to make a Child Theme 81 The style.css 55 How to activate jQuery 84 The index.php 57 Nodejs and WordPress 86 header.php and footer.php 60 GULP and SASS 90 functions.php 62 Innovations in WordPress 4.7.x 96 Menus 66 How to use the REST API 98 Theme Widgetizing 70 Introduction to the wp-cli 100 Advanced Loops: Snippets and Tags 73 Install wp-cli 103 The Template Hierarchy 76 Final Words 106 References 108 5 Introduction On the internet, about one in • Part Two: Diving into four pages are “powered by Themes WordPress”. "WordPress in the The second part focuses on Classroom” is in two parts. The WordPress frontend devel- first part will give you knowledge opment. You will learn how about WordPress, and the se- to create your own design - cond is an introduction to Word- either from scratch or tweak Per Thykjær Jensen Press frontend development: an existing theme by a child theme. Part two will also in- • Part One: Making Word- troduce some new trends in Press WordPress frontend develop- Here you will find an intro- ment such as Nodejs featu- duction to the history and res and command line tools. Project Manager and Senior Lecturer the open source philoso- Business Academy Aarhus phy behind WordPress. Part The book is the output from a Research and Innovation one will give an idea of the research project at the Research Phone: +45 7228 6321 creative process behind the and Innovation department [email protected] Twenty Seventeen theme. at Business Academy Aarhus. This part is an answer to the The project was initiated by an question: What should the increasing number of students upcoming WordPress profes- used WordPress in their projects, sional know in order to meet or having to work with Word- the demands of business? Press during internships. This observation led to the research question: what should the multimedia student know about WordPress in order to meet the demands of future 6 WORDPRESS IN THE CLASSROOM employers? Several months theme. I guess that most people If you have a basic knowledge of study followed. Books on will be able to follow part one of HTML, CSS, JavaScript and WordPress, wikis and research of the book, since it’s a narra- possibly PHP, you will be able to articles were consulted. Busines- tive. follow the instructions given in ses professionals and students the second part. were interviewed. I also followed the work of the core developers closely, and “WordPress in the Classroom” Here you can see how Word- came to know more about their is intended for those who need Press emerge from the creati- workflow, methods and code. to either teach or study Word- ve vision of the open source The second part of the book Press. I hope that it will open community behind WordPress. focuses on front-end devel- the doors, and ease the path for Most researchers focus on the opment code. That is: how to the upcoming professional open usability of WordPress. Most of create a WordPress theme – or source developer. the articles I found were studies web design so to speak. of a particular WordPress solu- tion. The researchers tested the solution on a number of users. If you teach, “WordPress in In you’re studying and By statistic method the authors the Classroom” can give you: expect to use WordPress in would conclude whether Word- your professional career this Press was usable or not. • Insight into the workflow book will give you: and know-how of Word- An empiric method like that will Press professionals. • Information about the not explain how or why certain • The history and the crea- open source philosophy WordPress features are made. tive process behind the behind WordPress And since WordPress is of vital creation of WordPress. • Knowledge about how importance for a great variety of • What you need to know in to the make a WordPress businesses, such knowledge is order to create a stun- theme. important. That’s why I decided ning WordPress theme. • What’s new or coming to follow the making of a new • Innovations in WordPress up? New trends in Word- 4.7.x Press. 7 A classroom is basically like a The book was prepared for the book will give you valuable lab. Here we can experiment. WordPress professionals in information. Try stuff, and work with back- small to medium sized busi- ground information in ways nesses. It will answer questions Open source is actually organi- that may be possible in real life like: zed in a very professional way. working situations. In real life In the book, you can follow situations, you just have to de- • How do WordPress profes- how a core-theme was made. liver. The idea behind this book sionals work with the CMS You will get valuable informa- is to open the gates to Word- in small to medium sized tion about developing you own Press. What is it. How you can businesses? themes. develop solutions, and to see • And what should they know how WordPress is used by small in order to be WordPress “WordPress in the Classroom” and medium sized businesses. practionas? is not meant as a tutorial, nor is it an omniscient manual. The “WordPress in the Classroom” is Most WordPress users take book is more like a Swiss army meant as a handbook that will the software more or less for knife for WordPress teachers open doors to a deeper under- granted. If a business depends and students. The book will standing of WordPress. These on WordPress, it is important point out where you can find days, WordPress is the content to know how WordPress is the knowledge you need in manager behind roughly 25% of made. During the preparations order to work as a WordPress all web pages. Understanding for the book, I assumed the professional. Several code WordPress is vital for anyone role of a WordPress maker and samples were made. All code is studying the web - or working followed the development of available via Github. The main as a professional web developer. the Twenty Seventeen Word- code repositories are: Press-core theme. The process gave valuable knowledge about • A primitive theme, called the creative process behind Petj-mini-theme. I guess that WordPress. If you should want this theme is almost as mini- to contribute to WordPress, mal as possible. 8 WORDPRESS IN THE CLASSROOM • A Bootstrap theme, called It is possible to create very I hope that you will enjoy ”Word- Bootstrap-F16-Skeleton. good WordPress solutions with Press in the Classroom”. Here the code demonstrates very little or even no code at how to make a theme that’s all. A WordPress professional ready for Bootstrap and even should have at least some un- jQuery. derstanding of the mechanisms • Yet another theme skeleton, of a theme. You don’t have to called: Petj-mvp be an expert in order to read • Finally, the theme Nuit. It is a the code, but a little knowledge theme with Nodejs features. about HTML, CSS and JavaScript is necessary. 9 Part one: Making WordPress Here you will find an introduction to the history and the open source philosophy behind WordPress. Part one will give an idea of the creative process behind the Twenty Seventeen theme. This part is an answer to the question: What should the upcoming WordPress professional know in order to meet the demands of the business? 10 WORDPRESS IN THE CLASSROOM 11 What You Should Know About WordPress There is a clear difference between using WordPress in the business world and in the classroom. In business life, one just has to deliver. There is a costumer, and the developer must comply with whatever demands the client may have. As a contrast, the classroom is a lab where experiments are possible. Interviews with a student and As a Multimedia student, Sandra Case II: The WordPress busi- a professional web designer Kristholm developed a Word- ness professional gave valuable information about Press CMS for a business client, Daniel Pape is a WordPress WordPress in the business world.