SlideShare a Scribd company logo
1 of 20
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
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
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
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
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
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
add_editor_style(); Add some styles to TinyMCE  Slide 7 of 20 rethink  |  redesign  |  results
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
add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); Gorgeousness in 3.1 Slide 9of 20 rethink  |  redesign  |  results
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
add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); Example http://31.sennzademo.com/ Slide 11of 20 rethink  |  redesign  |  results
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
add_custom_background(); Give your client some control Slide 13 of 20 rethink  |  redesign  |  results
register_default_headers(); Variable logos, quarterly promos, think outside the box! Slide 14 of 20 rethink  |  redesign  |  results
register_default_headers(); Variable logos, quarterly promos, think outside the box! Slide 15 of 20 rethink  |  redesign  |  results
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
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
register_sidebar(); Widget the World Watcher! The results: Slide 18 of 20 rethink  |  redesign  |  results
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
bronson@sennza.com.au http://www.sennza.com.au/ Twitter: @sennza rethink  |  redesign  |  results

More Related Content

Recently uploaded

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Recently uploaded (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
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
  • 7. add_editor_style(); Add some styles to TinyMCE Slide 7 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
  • 9. add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); Gorgeousness in 3.1 Slide 9of 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
  • 11. add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); Example http://31.sennzademo.com/ Slide 11of 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
  • 13. add_custom_background(); Give your client some control Slide 13 of 20 rethink | redesign | results
  • 14. register_default_headers(); Variable logos, quarterly promos, think outside the box! Slide 14 of 20 rethink | redesign | results
  • 15. register_default_headers(); Variable logos, quarterly promos, think outside the box! Slide 15 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
  • 18. register_sidebar(); Widget the World Watcher! The results: Slide 18 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
  • 20. bronson@sennza.com.au http://www.sennza.com.au/ Twitter: @sennza rethink | redesign | results