WordPress: Creating a Child Theme

What this course is about….

One-page sites with JavaScript-based scrolling navigation are popular, especially for creative portfolios and company websites. However, in WordPress, single-page sites also have severe restrictions and can be hard to manage. This course shows you how you can create a dynamic one-page front page for your WordPress site that pulls content from different areas and displays it in a visually stunning way. This method allows the front page to update automatically as site content changes, without you having to constantly manage it. Staff author Morten Rand-Hendriksen will take you step by step through this solution: creating a new template and content pages, calling content to the front page with custom loops, and adding JavaScript to enable sticky menus and scrolling. Watch more at: WordPress: Building a One-Page Style Site.

Topics include:

  • Creating a foundation for the front page with a child theme, styles, and dummy content
  • Using custom queries to display content from different pages
  • Adding testimonials
  • Adding a custom menu
  • Creating a scrolling effect

Themes

child themeWordPress users may install and switch between themes. Themes allow users to change the look and functionality of a WordPress website or installation without altering the information content or structure of the site. Themes may be installed using the WordPress “Appearance” administration tool or theme folders may be uploaded via FTP. The PHP(Hypertext Preprocessor, a recursive backronym), HTML(hyper text markup language) and CSS(cascading style sheet ) code found in themes can be added or edited for providing advanced features. Thousands of WordPress themes exist, some free, and some paid for templates. WordPress users may also create and develop their own custom themes if they have the knowledge and skill to do so. Learn more here: WordPress Code Reference

Child Themes and Frameworks

The main advantage of a framework like Genesis or Catalyst is that it is an actively maintained, very lightweight, secure, a clean coded parent theme with some additional functionality plugged into it via accessible hooks and filters.

There certainly is a learning curve to really grasp it – like learning the structure, naming system, plus the actions and filters that it includes. It’s well worth it though. At the same time, its easy to customize even if you don’t know all the ins and outs.

The Genesis Framework has some amazing child themes out there, plus, there are some sample base child themes that lay out the basic structure and allow you to mold your own custom theme.

Genesis allows developers to switch child themes with ease. It has a simple hooks plugin that allows developers and non-developers to customize with ease. There are many theme developers who use Genesis only, and it has simplified their business tremendously.

Extensive CSS adjustments to child themes should still live in a custom CSS file to be update proof, but most child themes give you a place for this. Customization couldn’t be easier.

However, extensive documentation and forums are out there for Genesis to give you snippets and help you learn.

Catalyst is an open source web application framework written in Perl, that closely follows the model–view–controller (MVC) architecture, and supports a number of experimental web patterns. It is written using Moose, a modern object system for Perl. Its design is heavily inspired by such frameworks as Ruby on Rails, Maypole, and Spring.

See more resources:

Website:
Build My Site

Web Technology Tutorial: Front-end Design

Get an overview of front-end site development in this tutorial, including common development languages, design processes, and more. Watch more at: Web Technology Fundamentals.

This tutorial is a single movie from the Web Technology Fundamentals course by lynda.com author James Williamson. The complete course is 2 hours and 4 minutes and shows how a “plain English” guide to the technology and the terminology behind the web.

Introduction
1. Introduction to the Web
2. Front-End Technology
3. Back-End Technology
4. Assembly Technologies

Front-end Development

front-endFront end development is the development of those elements of a website that the customers sees and interacts with directly. It is a combination programming skills (knowing which program to choose) and aesthetics (understanding element arrangements on the screen, the color and font choices). The challenges associated with front end developers is that the tools and techniques used to create the front end of a website change constantly and so the developer needs to constantly be aware of how the field is developing.

The objective of designing a site is to ensure that when the users opens up the site they see the information in a format thats easy to read and relevant. This is further complicated by the fact that users now use a large variety of devices with varying screen sizes and resolutions thus forcing the designer to take into consideration these aspects when designing the site. They need to ensure that their site comes up correctly in different browsers (cross-browser), different operating systems (cross-platform) and different devices (cross-device), which needs careful planning on the site of the developer.

Front and Back-ends

The front end is responsible for collecting input in various forms from the user and processing it to conform to a specification the back end can use. The front end is an interface between the user and the back end. The front and back ends may be distributed amongst one or more systems.

In software design, for example, the model-view-controller architecture, provides front and back ends for the database, the user, and the data processing components. The separation of software systems into front and back ends simplifies development and separates maintenance. A rule of thumb is that the front (or “client”) side is any component manipulated by the user. The server-side (or “back end”) code resides on the server. The confusion arises when one must make front-end edits to server-side files. Most HTML designers, for instance, don’t need to be on the server when they are developing the HTML; conversely, the server-side engineers are, by definition, never on anything but a server. It takes both to ultimately make a functioning, interactive website.

See Related Topics:

Website:
Build My Site

Squarespace: Add a Gallery Page

Squarespace is a web-publishing platform for everyone, and its popularity proves it’s here to stay. In this course, Brian Wood gets you up and running with Squarespace and on the road to building your very own website. Along the way, he will show you how to add the advanced features that attract visitors to modern sites, like image galleries, blogs, maps, and social media integration. Dive in and start concentrating on developing your content, not your code, with Squarespace. Watch more here: Up and Running with Squarespace.

Topics include:

  • What is Squarespace?
  • Changing templates
  • Editing styling
  • Arranging blocks of content
  • Working with text and images
  • Inserting video
  • Adding a blog and an image gallery
  • Creating your own domain

SquarespaceSquarespace is a great platform for people that do not know how to code websites, or they simply are not interested in learning. The user interface is intuitive and user friendly. Many small businesses and entreprenuers don’t have the time to design and develop a website for their business, but they want to have control over their content.

Latest Version

Completely new system featuring a more free form and flexible layout system. Added portfolio templates, responsive designs which work well on mobile devices. It is great that this version added a true developer platform allowing full control of all HTML, CSS and Javascript files. The commerce portion added ShipStation order integration, Xero accounting support, and Stripe payment processing.

Software as a Service (SaaS)

Squarespace is a SaaS-based content management system (CMS) which is composed of a website builder, blogging platform and hosting service. The service allows individuals and businesses to create and maintain websites and blogs. One of the biggest selling points for these companies is the potential to reduce IT support costs by outsourcing hardware and software maintenance and support to the SaaS provider. The Cloud (or SaaS) model has no physical need for indirect distribution since it is not distributed physically and is deployed almost instantaneously.

Some Examples of Drag and Drop

A common example is dragging an icon on a virtual desktop to a special trashcan icon to delete a file.

Further examples include:

  • Dragging a data file onto a program icon or window for viewing or processing. For instance, dropping an icon that represents a text file into a Microsoft Word window signifies “Open this document as a new document in Word”
  • Moving or copying files to a new location/directory/folder,
  • Adding objects to a list of objects to be processed,
  • Rearranging widgets in a graphical user interface to customize their layout,
  • Dragging an attribute onto an object to which the command is to be applied,
    • e.g. dragging a color onto a graphical object to change its color,
  • Dragging a tool to a canvas location to apply the tool at that location,
  • Creating a hyperlink from one location or word to another location or document.
  • Most word processors allow dragging selected text from one point to another.
  • Dragging a series of codeblocks such as in Blender for designing shaders and materials.

Website:
Build My Site

Exploring Our Workflow with Gulp.js, Git, and Browserify

Modern front-end development means more than just writing HTML, CSS, and JavaScript. Developing an efficient workflow will help you write better code and test and deploy your web applications easily and efficiently. Staff author Ray Villalobos is here to show you how to generate a workflow that makes it easier to build websites with processed languages like Sass, Compass, and CoffeeScript. He’ll show how to automate development and production versions of your sites, track and share project files with Git and GitHub, and add libraries like jQuery and Mustache.js with Browserify. All of these techniques should easily translate to building your own web projects. Watch more at: Web Project Workflows with Gulp.js, Git, and Browserify.

Topics include:

  • Why workflow management?
  • Processing tasks with gulp-coffee
  • Importing libraries with Browserify
  • Processing Sass and Compass
  • Issuing tasks in sequence
  • Watching changes to files
  • Adding static reloads
  • Setting up environment variables
  • Minifying HTML
  • Compressing images

JavaScript templating

Templating workflowJavaScript templating refers to the client side data binding method implemented with the JavaScript language. This approach became popular thanks to JavaScript’s increased use, its increase in client processing capabilities, and the trend to outsource calculus to the client’s web browser. Popular JavaScript templating libraries are Angular.js, Backbone.js, Ember.js, Handlebars.js, and Mustache.js. A frequent practice is to use double curly brackets (i.e. {{key}}) to call values of the given key from data files, often JSON objects.

Mustache (template system)

Mustache is a simple web template system with implementations available for ActionScript, C++, Clojure, CoffeeScript, ColdFusion, D, Delphi, Erlang, Fantom, Go, Java, JavaScript, Lua, .NET, Objective-C, Pharo, Perl, PHP, Python, Ruby, Scala and XQuery.

Mustache is described as a “logic-less” system because it lacks any explicit control flow statements, like if and else conditionals or for loops; however, both looping and conditional evaluation can be achieved using section tags processing lists and lambdas.

It is named “Mustache” because of heavy use of curly braces that resemble a mustache. See Mustache syntax.

Mustache is used mainly for mobile and web applications.

Examples

The simplest template:

Hello {{name}}

Template with section tag:

{{#x}}
some text
{{/x}}

CoffeeScript

CoffeeScript is a programming language that transcompiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python and Haskell to enhance JavaScript’s brevity and readability. Specific additional features include list comprehension and pattern matching. CoffeeScript compiles predictably to JavaScript, and programs can be written with less code, typically 1/3 fewer lines, with no effect on runtime performance. In 2013 it was also ranked 29th among languages, based on number of questions tagged at Stack Overflow.

The language has a relatively large following in the Ruby community. CoffeeScript support is included in Ruby on Rails version 3.1. In 2011, Brendan Eich referenced CoffeeScript as an influence on his thoughts about the future of JavaScript.

Website:
Build My Site

Installing and Setting up NetBeans or Another IDE

Ready for your next WordPress challenge? Learn how to build more complex custom themes using the _s (aka Underscores) starter theme. Morten Rand-Hendriksen takes you from basic layout and customization to enabling advanced responsive design and accessibility features. He reinforces the basics lessons with DRY (don’t repeat yourself) development practices and a structured approach that will help you build WordPress themes that meet modern standards. Watch more at: WordPress: Building Themes from Scratch Using Underscores

Topics include:

  • Installing WordPress, Underscores, plugins, and NetBeans
  • Designing for mobile, content, and style
  • Setting up the basic theme
  • Building a custom header
  • Designing responsive, accessible menus
  • Adding a custom search form
  • Using and styling widgets
  • Adjusting the Single Post Template
  • Working with comments, featured images, index templates, and static pages
  • Adding editor styles to match front-end styles

NetBeans

NetBeansNetBeans is an integrated development environment (IDE) for developing primarily with Java, but also with other languages, in particular PHP, C/C++, and HTML5. It is also an application platform framework for Java desktop applications and others.

The NetBeans IDE is written in Java and can run on Windows, OS X, Linux, Solaris and other platforms supporting a compatible JVM.

The NetBeans Platform allows applications to be developed from a set of modular software components called modules. Applications based on the NetBeans Platform (including the NetBeans IDE itself) can be extended by third party developers.

The NetBeans Team actively support the product and seek future suggestions from the wider community. Every release is preceded by a time for Community testing and feedback

NetBeans IDE

NetBeans IDE is an open-source integrated development environment. NetBeans IDE supports development of all Java application types (Java SE (including JavaFX), Java ME, web, EJB and mobile applications) out of the box. Among other features are an Ant-based project system, Maven support, refactorings, version control (supporting CVS, Subversion, Git, Mercurial and Clearcase).

Modularity: All the functions of the IDE are provided by modules. Each module provides a well defined function, such as support for the Java language, editing, or support for the CVS versioning system, and SVN. NetBeans contains all the modules needed for Java development in a single download, allowing the user to start working immediately. Modules also allow NetBeans to be extended. New features, such as support for other programming languages, can be added by installing additional modules. For instance, Sun Studio, Sun Java Studio Enterprise, and Sun Java Studio Creator from Sun Microsystems are all based on the NetBeans IDE.

GUI Design Tool

Formerly known as project Matisse, the GUI design-tool enables developers to prototype and design Swing GUIs by dragging and positioning GUI components.

The GUI builder has built-in support for JSR 295 (Beans Binding technology), but the support for JSR 296 (Swing Application Framework) was removed in 7.1.

NetBeans JavaScript editor

The NetBeans JavaScript editor provides extended support for JavaScript, Ajax, and CSS.

JavaScript editor features comprise syntax highlighting, refactoring, code completion for native objects and functions, generation of JavaScript class skeletons, generation of Ajax callbacks from a template; and automatic browser compatibility checks.

CSS editor features comprise code completion for styles names, quick navigation through the navigator panel, displaying the CSS rule declaration in a List View and file structure in a Tree View, sorting the outline view by name, type or declaration order (List & Tree), creating rule declarations (Tree only), refactoring a part of a rule name (Tree only).

The NetBeans 7.4 and later uses the new [Nashorn] JavaScript engine developed by Oracle.

Website:
Build My Site

PHP Tutorial: How to Use PHP in a Web Page

There are many great reasons to learn PHP. You can reduce manual updates to webpages, get user input, and connect to a database of products or other information. But some web designers are intimidated by the theory and jargon. PHP for Web Designers is different. Author David Powers provides a gentle introduction to PHP, through a series of simple exercises that help you develop fully functional dynamic webpages—all powered by PHP. Watch more at: PHP for Web Designers.

Note: This course was recorded with Adobe Dreamweaver, but you can use the code editor of your choice to follow along.

Topics include:

  • How to use PHP in a webpage
  • Storing and displaying text and numbers in variables
  • Using functions
  • Adding comments to your PHP scripts
  • Moving common page elements to include files
  • Displaying different content on a page
  • Working with multiple values in arrays and loops
  • Getting form input sent by the POST method
  • Using PHP sessions to preserve data
  • Storing data in session variables
  • Connecting to and querying a database
  • Handling errors

Basic Language Constructs

phpEach PHP statement is terminated by semicolon (“;”). The PHP markup can display text by using “echo” with variables named by dollar-prefix “$” on case-sensitive names ($xx, $xX, $NewX, etc.). The assignment operator is “=”. The markup can be modularized into functions (or methods) defined with keyword “function” within optional classes named by “class xx”. The control structures include: if, while, for, foreach, & switch. Grouping of text can be specified by curly braces (“{…}”), but some control structures can use colon syntax with end keywords, such as in statement if ($x==0) : echo “zero”; endif; <html>

Delimiters

The PHP processor only parses code within its delimiters. Anything outside its delimiters is sent directly to the output and not parsed by PHP. The most common open/close delimiters are “” so that a section of PHP markup appears within the set of angle-brackets “” (see examples below in boxes). Other delimiters, in the form ““, are also always available, so these two forms are the most portable. The first form of delimiters, , in XHTML and other XML documents, creates correctly formed XML processing instructions. Therefore, in either of these two cases, the resulting mixture of PHP and other markup is well-formed, and so probably valid, as XML and XHTML on the server before PHP processing. This may be helpful if the source code documents ever need to be processed in other ways during the life of the software.

Short opening tags (<? or <?=) are also available for use, but are, along with ASP style tags (<% or <%=), less-portable, as they can be disabled in the PHP configuration. For this reason, the use of Short tags and ASP style tags is discouraged. The purpose of these delimiters is to separate PHP code from non-PHP code (notably HTML). Everything outside the delimiters is ignored by the PHP parser and is passed through as output.

The usual “Hello World” code example for PHP is:

<?php
echo "Hello World!\n";
?>

The example above outputs the following:

Hello World!

Instead of using <? and the echo statement, an optional “shortcut” is the use of <?= instead of <? which implicitly echoes data. For example, to show the page_title:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
 <title><?=$page_title;?></title>
 </head>
 <body>
 <p>Hello World!</p>
 </body>
</html>

The above example also illustrates that text not contained within enclosing PHP tags will be directly output. So the simplest form of Hello World in PHP is a plain text file containing “Hello World”.

Website:
Build My Site

Node.js Essential Training: Understanding Module Caching and Scopes

Node.js is a powerful tool for controlling web servers, building applications, and creating event-driven programming. And it brings JavaScript, a language familiar to all web developers—into an environment independent of web browsers. Learn all about Node.js and start creating JavaScript applications in this course.

The first time Node loads a module through require, it caches the result. This can be beneficial, but can create problems if you don’t plan ahead. In this tutorial, look at when caching is helpful and when it’s necessary to work around. Watch more at: Node.js Essential Training.

This tutorial is a single movie from the Node.js Essential Training course presented by lynda.com author Joseph LeBlanc. The complete course is 3 hours and 17 minutes and shows how to start creating entire JavaScript applications with Node.js.

Topics include:

  • Why use Node.js?
  • Installing Node.js
  • Understanding the event loop
  • Initializing Node.js projects
  • Creating modules with getters and setters
  • Starting Express applications
  • Testing your code
  • Working with sessions and databases
  • Building command-line tools
  • Emitting events and attaching listeners
  • Controlling readable streams

Node.js

node.jsNode.js is a software platform for scalable server-side and networking applications. Node.js applications are written in JavaScript, and can be run within the Node.js runtime on Mac OS X, Windows and Linux with no changes.

Node.js applications are designed to maximize throughput and efficiency, using non-blocking I/O and asynchronous events. Node.js applications run single-threaded, although Node.js uses multiple threads for file and network events. Node.js is commonly used for real time applications due to its asynchronous nature.

Node.js internally uses the Google V8 JavaScript engine to execute code, and a large percentage of the basic modules are written in JavaScript. Node.js contains a built-in asynchronous i/o library for file, socket and HTTP communication. The HTTP and socket support allows Node.js to act as a web server without additional web server software such as Apache.

Node.js is a platform built on Chrome’s JavaScript runtime (Google V8 VM) for easily building fast, scalable network applications. The platform uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time apps that run across distributed devices.

Examples

This is an implementation of a “hello world” HTTP server in Node.js:

var http = require('http');
 
http.createServer(
  function (request, response) {
    response.writeHead(200, {'Content-Type': 'text/plain'});
    response.end('Hello World\n');
  }
).listen(8000);
 
console.log('Server running at http://localhost:8000/');

The following code is a simple TCP server which listens on port 8000 and echoes ‘hello’ upon connection:

var net = require('net');
 
net.createServer(
  function (stream) {
    stream.write('hello\r\n');
 
    stream.on('end',
      function () {
        stream.end('goodbye\r\n');
      }
    );
 
    stream.pipe(stream);
  }
).listen(8000);

Write your application components in JavaScript, Ruby, Groovy or Java. Or mix and match several programming languages in a single application.

Website:
Build My Site