Categories
WordPress as CMS

BCIT Class Materials

I’m teaching two classes on WordPress at BCIT Friday August 21st. Below are the key code snippets along with a zipped archive of the famous Twitter box featured on this blog and in Computer Arts Magazine.

Replace the default heading with a clickable image

Alternate image text

The get_bloginfo(); template function


Where $show can be name, description, url, template_url etc. Full explanation in the WordPress Codex.

Custom Page Template


Standard PHP Include


Insert Custom Field in Template

ID, '$key', true); ?>

Conditional Custom Field

ID, 'divName', true))) { ?>
		
ID, 'divName', true); ?>

The Twitter Box

Click here to download a zipped archive of the Twitter box. Remember to change the username inside twitter.php, otherwise you’ll get my tweets on your site!

By Morten Rand-Hendriksen

Morten Rand-Hendriksen is a staff author at LinkedIn Learning and lynda.com specializing in WordPress and web design and development and an instructor at Emily Carr University of Art and Design. He is a popular speaker and educator on all things design, web standards and open source. As the owner and Web Head at Pink & Yellow Media, a boutique style digital media company in Burnaby, BC, Canada, he has created WordPress-based web solutions for multi-national companies, political parties, banks, and small businesses and bloggers alike. He also contributes to the local WordPress community by organizing Meetups and WordCamps.

One reply on “BCIT Class Materials”

Comments are closed.