Theming Wordpressfor your showcaseMathias FunkJun Hu
SummaryWhat is a CMS?Wordpress and some important toolsHands-onContent and styling - HTML and CSSHands-onA simple themeHands-onBuilding your showcaseHands-onTake away
Web server vs. browser + What is a CMS?How to manage content on the web?
Dynamic contentInternet ExplorerSafariFirefoxOpera…Apache Microsoft IIS…PHPColdFusionASPJSP…MySQLPostgreSQLMS SQL ServerOracleDB2…
Content Management Systems
Content Management Systems
Wordpress and EditorsInstallation guide and tools you will need
Installing Wordpresshttp://codex.wordpress.org/Installing_WordPressOr Google “installing wordpress”
Local Installation (Mac)http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMPOr Google “Wordpress MAMP”Alternative:http://bitnami.org/stack/wordpressOr google “bitnamiwordpress”Install the native stack for Mac
Local Installation (Windows)Instead of Microsoft Web Platform Installer (Web PI), We will be using Bitnami ApplianceExperience with PhpMyAdmin and MySQL for later migrating to a real web server.
BitnamiWordpress Stackhttp://bitnami.org/stack/wordpressOr google “bitnamiwordpress”Download the native stack for WindowsDo select “PhpMyAdmin”When asked, use “localhost” as the hostname.
BitnamiWordpress StackDo select PhpMyAdmin
BitnamiWordpress StackWhen asked, use “localhost” as the hostname.
BitnamiWordpress StackTry http://localhost, If you have got it right:
BitnamiWordpress StackBy default, the Wordpress files are in:C:\Program Files\BitNamiWordPressStack\apps\wordpress\htdocsOrC:\Program Files (x86) \BitNamiWordPressStack\apps\wordpress\htdocshttp://localhost/phpmyadmin for database administrationUser: administratorPassword: [your administration password selected during installation]
Install a proper text editorDreamweaver is overkilling.NotePad++http://notepad-plus-plus.orgNotePad2http://www.flos-freeware.ch/notepad2.html…“Run as Administrator” might be needed for editing the PHP scripts in Installed Wordpress.
Install a proper text editorDreamweaver is overkilling.NotePad++http://notepad-plus-plus.orgNotePad2http://www.flos-freeware.ch/notepad2.html…“Run as Administrator” might be needed for editing the PHP scripts in Installed Wordpress.
Start/Stop Apache/Mysql servicesStart > All programs > BitnamiWordpress Stack >BitnamiWordpress Stack ServiceStart/Stop BitnamiWordpress Stack Servicehttp://dl.dropbox.com/u/2022550/wordpress_workshop.pptxhttp://dl.dropbox.com/u/286741/WPWorkshop/helloworld.php
BrowserApache PHP MySQLHello World!<html><body><?phpmysql_connect (localhost, bitnami, ‘d26d69602c’);mysql_select_db (bitnami_wordpress);	$result = mysql_query ("		SELECT * FROM wp_posts		WHERE post_title LIKE 'Hello World!'	");	if ($row = mysql_fetch_array($result)) {		print $row["post_content"];		print (" ");	} else {		print "Sorry, no records were found!";	}?></body></html>
HTML / CSS
Content StructureVisionPastCompetenciesFeedback / resultsPresentCompetenciesProjectsAssignmentsFutureNext semesterBachelor / MasterOne page: Text + Picture
Separation of content and styleWebMS WordLaTeXCMS…CSSBiu Biu Style…HTMLTextTextContent…
Examplesfrom: http://www.csszengarden.com/
HTMLTags<h1> headline </h1><p> paragraph </p><a> link (anchor) </a><img>Attributes<a href=“http://www.tue.nl”>TU/e</a><imgsrc=“tue_logo.png”>
HTMLClasses<h1 class=“main-title”><p class=“content-text”><p class=“content-text”><p class=“content-text”>Identifier<p id=“teaser” class=“content-text”>
CSSCascading Style SheetsStyle HTML filesCSSHTMLHTML
CSSStylingTagsh1 {	background-color: red;}Classes.content-text {	font-style: italic;	}Identifier#teaser {	letter-spacing: 1px;}Style hierarchy#teaser a {		text-decoration: none;}Pseudo styles#teaser a:hover {		text-decoration: underline;}
UnitsPixels (px)p {	width: 300px;}Points (pt)p {	font-size: 10pt;}Em unit (em)p {	line-height: 1.5em;}depending on font size of parent element, em is a multiplier: Parent font size: 16px, then 1em is exactly 16px, 1.5em is 24px etc.
ColorsYellow?Hex shorthand:#aabbcc #abc#0033ff #03f
Hands-onDownload HTML and CSS file from:http://dl.dropbox.com/u/286741/WPWorkshop/example1.zipGoogle: “CSS reference”Make this:
Box model
Box model examplesborder: 1px solid red;	padding: 5px;	margin: 0px 10px 10px 30px;	margin: 0px 10px 10px;	margin: 10px 0;
PositioningDefault (static)Show and hide elementsdisplay: none;display: block | inline;Layout in order of appearanceFloatingfloat: left | right;clear: left | right | both;AbsoluteAbsolute positioningposition: absolute;top | left | right | bottom: 100px;RelativeSimilar to static, but with top, left, right, bottomposition: relative;left : -10px;(Fixed)
Hands-onDownload HTML and CSS file from:http://dl.dropbox.com/u/286741/WPWorkshop/example2.zipMake this:
Themes
Where are the themes?
Get a themehttp://wordpress.org/extend/themes/simplesthttp://wordpress.org/extend/themes/coralineThere are many more themes on the web…Do not download and install a theme without checking it!
Install theme
Activating themes
Widgets
Inside a themeheader.phpstyles.csssidebar.phppage.php for pagesindex.php for newest postssingle.php for a single postContent areasearch.php for search results404.php for error pagefooter.php
Make vision page the first page
Building your showcase
Hands-onChoose a themeInstall it, activate it, choose widgetsCustomize it with additional stylingContentCreate page structure as pages: Vision, Past, …Write simple clear textLink outHave pictures and even embedded videosMake Vision page first pageSpread the word!
Take away
Using Wordpress for realCheck your layout with different browsers(at least Firefox, Safari, IE 8 + 9)Move from local to a real web serverExport local database, then import it on new serverCopy templates and settings (usually just wp-content)Check wp_config.phpfor changes (Database account)Dashboard/Settings: Wordpress/site address (URL)ActivateCaching (WP Super Cache)Search engine accessKeep WP updatedWork on the content, a LOT!
J.hu@tue.nlM.funk@tue.nl

Theming Wordpress for Your Showcases