Difference between revisions of "Week Ten (MGDP2060)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
Line 1: Line 1:
 
This article lists topics for week ten of [[Web Design and Development III (MGDP2060)]].
 
This article lists topics for week ten of [[Web Design and Development III (MGDP2060)]].
 +
 +
== Simple custom theme ==
 +
 +
Last week, we created a simple custom theme.
 +
 +
Review:
 +
 +
* ...
 +
 +
== Theme development using multiple theme folders ==
 +
 +
When creating a custom theme, you can structure your work work as several different custom themes, each representing a different stage in the development of your final theme.
 +
 +
That way, you can look back on previous stages of development, comparing your current theme with earlier versions.
 +
 +
If something goes wrong with your current version, you can examine the previous version, figure out how to figure your current version, perhaps copy-and-paste code from previous versions to the current version, etc.
 +
 +
This is often helpful, for novice and experienced developers alike.
 +
 +
Creating a new version is easy:
 +
 +
* Create a copy of the current theme folder, with a different folder name
 +
** Pick folder names that indicate version, e.g. <code>MyTheme1</code>, <code>MyTheme2</code>,
 +
* In the copy, in <code>style.css</code>, change the Theme Name.
 +
 +
The alternative is to keep modifying one custom theme until it is complete.
 +
 +
== WordPress CSS ==
 +
 +
As we saw last week, you can hard-code <code>links</code> <code>style</code> directly into your theme (in <code>header.php</code>).
 +
 +
Hard-coding is a hack -- a temporary solution, in this case as a classroom example, to demonstrate how WordPress works.
 +
 +
The proper solution is to do it the WordPress way:
 +
 +
* In <code>style.css</code>
 +
* In other external style sheet(s), the WordPress way
 +
 +
== style.css ==
 +
 +
...
 +
 +
== Other external style sheets ==
 +
 +
...
  
 
== Terminology ==
 
== Terminology ==

Revision as of 07:39, 5 November 2015

This article lists topics for week ten of Web Design and Development III (MGDP2060).

Simple custom theme

Last week, we created a simple custom theme.

Review:

  • ...

Theme development using multiple theme folders

When creating a custom theme, you can structure your work work as several different custom themes, each representing a different stage in the development of your final theme.

That way, you can look back on previous stages of development, comparing your current theme with earlier versions.

If something goes wrong with your current version, you can examine the previous version, figure out how to figure your current version, perhaps copy-and-paste code from previous versions to the current version, etc.

This is often helpful, for novice and experienced developers alike.

Creating a new version is easy:

  • Create a copy of the current theme folder, with a different folder name
    • Pick folder names that indicate version, e.g. MyTheme1, MyTheme2,
  • In the copy, in style.css, change the Theme Name.

The alternative is to keep modifying one custom theme until it is complete.

WordPress CSS

As we saw last week, you can hard-code links style directly into your theme (in header.php).

Hard-coding is a hack -- a temporary solution, in this case as a classroom example, to demonstrate how WordPress works.

The proper solution is to do it the WordPress way:

  • In style.css
  • In other external style sheet(s), the WordPress way

style.css

...

Other external style sheets

...

Terminology

See also