Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
What you should be utilising in the Twenty Ten functions.php
1. What you should be utilising in the Twenty Ten functions.php A.k.a Pimp my theme! By Bronson Quick sennza | (07) 3040-1545 | bronson@sennza.com.au | http://www.sennza.com.au/ | Twitter: @sennza
2. Who Am I? I’m an infatuated WordPress geek I contain these $args: I live in sunny (floody) Brisbane! I’m a partner @sennza http://www.sennza.com.au/ Have been a geek for about 12 years...crap...I’m old! Have used many other CMS in the past...e.g. Joomla, Modx and loads of proprietary CMS Co – organizer of the WordPress Brisbane & WordPress Sydney Meetups http://www.wpbrisbane.com.au/ & http://www.wpsydney.com.au/ Possible/probably/more then likely a co-organizer for WordCamp Gold Coast in late 2011 Tweet us @sennza – Cool links and occasional blog posts Tweet me @bronsonquick – Committing acts of random and bad taste humour...especially during all night coding sessions Slide 2 of 20 rethink | redesign | results
3. What we’ll cover A handful of functions in the functions.php file of the Twenty Ten theme We’ll cover: What functions.php is and how you can use it in your themes add_editor_style(); Post Formats (Yeah Baby!) Post Thumbnails - a.k.a How to save the ‘How do I size a photo’ calls from clients! register_nav_menus(); add_custom_background(); register_default_headers(); register_sidebar(); - Get yo’ widget on! Questions & Answers And den?? NO AND DEN! Slide 3 of 20 rethink | redesign | results
4. Functions.php A quick recap for those new to WordPress themes What is functions.php? This file acts like a plugin You can add it to any theme Loads automatically Think about what you’re using and whether it should be in functions.php or a plugin If it’s better off being a plugin then maybe it should live in the wp-content/mu-plugins folder? http://codex.wordpress.org/Theme_Development#Functions_File http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users Slide 4 of 20 rethink | redesign | results
5. 2010 Functions.php Have you had a read through it? Why bother? Well documented Lots of tricks and code to refer back to for new projects Starkers (Might take a little while for Elliot Jay Stocks to update for 3.1) http://starkerstheme.com/ Slide 5 of 20 rethink | redesign | results
6. add_editor_style(); Add some styles to TinyMCE What you need: And create an editor-style.css with some CSS basic styles in it. Slide 6 of 20 rethink | redesign | results
8. add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); Gorgeousness in 3.1 New and exciting!Supports the following: aside gallery link image quote status video audio chat http://starkerstheme.com/ Slide 8 of 20 rethink | redesign | results
10. add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); What happens on the frontend Style it up for your client! Add icons, change the colour, add an icon...use your imagination! Slide 10of 20 rethink | redesign | results
12. register_nav_menus(); Don’t just use one menu. Be creative! What’s it do? Registers navigation menu positions! Ditch your text widgets in the footer!register_nav_menus( array( ‘primary' => __( 'Primary Navigation', 'twentyten' ), 'secondary' => __( 'Secondary Navigation', 'twentyten' ), ); Then in footer.php add: <?php wp_nav_menu( array( 'container_class' => 'menu-footer', 'theme_location' => 'secondary' ) ); ?> http://codex.wordpress.org/Function_Reference/register_nav_menus Slide 12 of 20 rethink | redesign | results
16. register_sidebar(); Widget the World Watcher! What’s it do? Registers widget areas! Add widgets into your theme to give you client more control. Think of places your client might want to put a promo image, advertisements and more! The code for functions.php:register_sidebar( array('name' => __( ‘Cool Widget Area', 'twentyten' ),'id' => ‘cool-widget-area‘,'description' => __( 'The cool widget area', 'twentyten' ),'before_widget' => '<li id="%1$s" class="widget-container %2$s">','after_widget' => '</li>','before_title' => '<h3 class="widget-title">','after_title' => '</h3>',) ); http://codex.wordpress.org/Function_Reference/register_sidebar Slide 16 of 20 rethink | redesign | results
17. register_sidebar(); Widget the World Watcher! The code for your theme:<?php if ( is_active_sidebar( ‘cool-widget-area' ) ) : ?> <div id=“cool" class="widget-area"> <ul class="xoxo"> <?php dynamic_sidebar( ‘cool-widget-area' ); ?> </ul> </div><!-- #cool .widget-area --> <?php endif; ?> http://codex.wordpress.org/Function_Reference/register_sidebar Slide 17 of 20 rethink | redesign | results
19. Thanks & Questions Meetup groups The Brisbane WordPress Meetup Group http://www.wpbrisbane.com.au/ The Sydney WordPress Meetup Group http://www.wpsydney.com.au/ Twitter @sennza @bronsonquick Slide 19 of 20 rethink | redesign | results