SlideShare una empresa de Scribd logo
1 de 27
Advanced Thesis  Techniques and Tricks Brad Williams WebDevStudios.com
Brad Williams CEO & Co-Founder, WebDevStudios.com Co-Host SitePoint Podcast Organizer NJ WordPress Meetup Who Am I? Recent Thesis Sites: AwayToGarden.com (WPMU) LoomisCreek.com TheSisterProject.com (WPMU) MattBites.com RetroRenovation.com
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Topics
What is Thesis?
[object Object],[object Object],[object Object],[object Object],Thesis is a Premium Theme  Framework with a focus on… Thesis was created by this guy: Chris Pearson
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Who uses Thesis?
[object Object],[object Object],Thesis customization is powered by two files ,[object Object],[object Object],[object Object],Location:
What is a Hook?
What is a Hook?
Thesis features a simple hook system that is essentially an API—a set of basic commands that you can use to add to, subtract from, and modify the functionality of your Thesis installation. Two step process: 1. construct a simple function to house your custom code 2. Tell Thesis where to place your custom code by specifying the appropriate hook You can add and remove any functions using add_action() and remove_action()
Available Thesis Hooks thesis_hook_before_html thesis_hook_after_html thesis_hook_before_header thesis_hook_after_header thesis_hook_header thesis_hook_before_title thesis_hook_after_title thesis_hook_before_content_box thesis_hook_after_content_box thesis_hook_before_content thesis_hook_after_content thesis_hook_feature_box thesis_hook_before_post_box thesis_hook_after_post_box thesis_hook_before_teasers_box thesis_hook_after_teasers_box thesis_hook_before_post thesis_hook_after_post thesis_hook_before_teaser_box thesis_hook_after_teaser_box thesis_hook_before_teaser thesis_hook_after_teaser thesis_hook_before_headline thesis_hook_after_headline thesis_hook_before_teaser_headline thesis_hook_after_teaser_headline thesis_hook_byline_item thesis_hook_before_comment_meta thesis_hook_after_comment_meta thesis_hook_after_comment thesis_hook_comment_form thesis_hook_archives_template thesis_hook_custom_template thesis_hook_faux_admin thesis_hook_archive_info thesis_hook_404_title thesis_hook_404_content thesis_hook_before_sidebars thesis_hook_after_sidebars thesis_hook_multimedia_box thesis_hook_after_multimedia_box thesis_hook_before_sidebar_1 thesis_hook_after_sidebar_1 thesis_hook_before_sidebar_2 thesis_hook_after_sidebar_2 thesis_hook_before_footer thesis_hook_after_footer thesis_hook_footer
48 Hooks (In case you were counting)
Example 1: Hello WordCamp <?php add_action('hook_name', ‘hello_wordcamp');  Function hello_wordcamp() { echo “Hello WordCamp!”; } ?>
Example 2:  Custom Footer <?php remove_action('thesis_hook_footer', 'thesis_attribution'); add_action('thesis_hook_footer', 'my_footer'); function my_footer() {     echo “<p>Copyright &copy;  WebDevStudios.com</p>“; } ?>
Now for the fun stuff
Example 3:  Custom Page Template <?php remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample'); add_action('thesis_hook_custom_template', 'home_custom'); ?> Remember to set the page template to Custom Template
Example 4:  Add A Secondary Menu Thesis by default has a single menu So lets create a secondary menu!
Example 4:  Add A Secondary Menu <?php function topnav_menu() {  ?>  <ul id=&quot;topnav&quot;>  <li><a href=“/wordpress&quot;>WordPress</a></li>  <li><a href=“/wpmu&quot;>WPMU</a></li>  <li><a href=“/buddypress”>BuddyPress</a></li>  <li><a href=“/bbpress&quot;>bbPress</a></li>  </ul>  <?php  }  add_action('thesis_hook_before_header', 'topnav_menu');  ?>
Example 4:  Add A Secondary Menu /* Top Nav bar */ .custom ul#topnav { border-style: none; list-style-image: none; list-style-position: outside; list-style-type: none; background:#E4E4E4 none repeat scroll 0 0; width: 100%; float: left; } .custom ul#topnav li { float: left; padding: 3px 10px 3px 0px; } .custom ul#topnav li a { font-size: 1.1em; color: #000000; } .custom ul#topnav li a:hover { text-decoration: underline; }  Add a little styling in custom.css
Example 4:  Add A Secondary Menu BAM!  Another menu! Ref: http://www.emptycabinmedia.com/thesis-theme-add-another-menu/
Example 5:  Widgetize your Multimedia Box
Example 5:  Widgetize your Multimedia Box <?php register_sidebar(array('name' => 'Multimedia Box', 'before_widget' => '<li class=&quot;widget %2$s&quot;>', 'after_widget' => '</li>', 'before_title' => '<h3>', 'after_title' => '</h3>'));  function multimedia_box_widgets() {  echo '<ul class=&quot;sidebar_list&quot;>';  dynamic_sidebar('Multimedia Box');  echo '</ul>';  }  add_action('thesis_hook_multimedia_box', 'multimedia_box_widgets'); ?>
Example 5:  Widgetize your Multimedia Box Change the Multimedia Box setting to Custom code Add any widgets you want to the  Multimedia Box sidebar
Example 5:  Widgetize your Multimedia Box Now we are widgetized! Ref: http://rickbeckman.org/widgetizing-thesis-multimedia-box/
And there is no more, I lied In Summary, Thesis is a great theme for beginner and advanced users alike.
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thesis Resources
Brad Williams [email_address] Blog: strangework.com twitter.com/williamsba IRC: WDS-Brad Everywhere else: williamsba Contact

Más contenido relacionado

La actualidad más candente

WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013
Thor Kristiansen
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
Think Media Inc.
 

La actualidad más candente (20)

Higher Order WordPress Security
Higher Order WordPress SecurityHigher Order WordPress Security
Higher Order WordPress Security
 
WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013WordPress Security - WordPress Meetup Copenhagen 2013
WordPress Security - WordPress Meetup Copenhagen 2013
 
WordPress Security WordCamp OC 2013
WordPress Security WordCamp OC 2013WordPress Security WordCamp OC 2013
WordPress Security WordCamp OC 2013
 
Google Hacking Basics
Google Hacking BasicsGoogle Hacking Basics
Google Hacking Basics
 
Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010
 
WordPress Security - WordCamp Boston 2010
WordPress Security - WordCamp Boston 2010WordPress Security - WordCamp Boston 2010
WordPress Security - WordCamp Boston 2010
 
Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013Presentation to SAIT Students - Dec 2013
Presentation to SAIT Students - Dec 2013
 
Website security
Website securityWebsite security
Website security
 
WordPress Security Presentation
WordPress Security PresentationWordPress Security Presentation
WordPress Security Presentation
 
WordPress Security Best Practices 2019 Update
WordPress Security Best Practices 2019 UpdateWordPress Security Best Practices 2019 Update
WordPress Security Best Practices 2019 Update
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress Security
 
WordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityWordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress Security
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 201340 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
 
Protect Your WordPress From The Inside Out
Protect Your WordPress From The Inside OutProtect Your WordPress From The Inside Out
Protect Your WordPress From The Inside Out
 
Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011
 
Contributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonContributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter Wilson
 
How I learned to stop worrying and love the .htaccess file
How I learned to stop worrying and love the .htaccess fileHow I learned to stop worrying and love the .htaccess file
How I learned to stop worrying and love the .htaccess file
 
CSI: WordPress -- Getting Into the Guts
CSI: WordPress -- Getting Into the GutsCSI: WordPress -- Getting Into the Guts
CSI: WordPress -- Getting Into the Guts
 

Similar a Advanced Thesis Techniques and Tricks

Similar a Advanced Thesis Techniques and Tricks (20)

WordPress Development Confoo 2010
WordPress Development Confoo 2010WordPress Development Confoo 2010
WordPress Development Confoo 2010
 
Best practices in WordPress Development
Best practices in WordPress DevelopmentBest practices in WordPress Development
Best practices in WordPress Development
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big words
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
 
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
 
Extending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHPExtending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHP
 
Introduction to WordPress & Theme Development
Introduction to WordPress & Theme DevelopmentIntroduction to WordPress & Theme Development
Introduction to WordPress & Theme Development
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Wordpress Meetup 2 23 10
Wordpress Meetup 2 23 10Wordpress Meetup 2 23 10
Wordpress Meetup 2 23 10
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4
 
WordPress Accessibility: WordCamp Chicago
WordPress Accessibility: WordCamp ChicagoWordPress Accessibility: WordCamp Chicago
WordPress Accessibility: WordCamp Chicago
 
Writing your own WordPress themes and plugins
Writing your own WordPress themes and pluginsWriting your own WordPress themes and plugins
Writing your own WordPress themes and plugins
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
Blog HTML example for IML 295
Blog HTML example for IML 295Blog HTML example for IML 295
Blog HTML example for IML 295
 

Más de Brad Williams

Más de Brad Williams (16)

From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015
From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015
From Freelance to Agency: Hiring Employee Number One - WordCamp London 2015
 
Hiring Employee Number One: From Freelancer to Agency
Hiring Employee Number One: From Freelancer to AgencyHiring Employee Number One: From Freelancer to Agency
Hiring Employee Number One: From Freelancer to Agency
 
Writing Secure WordPress Code WordCamp NYC 2014
Writing Secure WordPress Code WordCamp NYC 2014Writing Secure WordPress Code WordCamp NYC 2014
Writing Secure WordPress Code WordCamp NYC 2014
 
How to Make a Native Mobile App with WordPress
How to Make a Native Mobile App with WordPressHow to Make a Native Mobile App with WordPress
How to Make a Native Mobile App with WordPress
 
Writing Secure WordPress Code
Writing Secure WordPress CodeWriting Secure WordPress Code
Writing Secure WordPress Code
 
Using WordPress as an Application Framework
Using WordPress as an Application FrameworkUsing WordPress as an Application Framework
Using WordPress as an Application Framework
 
Top Ten WordPress Security Tips for 2012
Top Ten WordPress Security Tips for 2012Top Ten WordPress Security Tips for 2012
Top Ten WordPress Security Tips for 2012
 
WordPress Security from WordCamp NYC 2012
WordPress Security from WordCamp NYC 2012WordPress Security from WordCamp NYC 2012
WordPress Security from WordCamp NYC 2012
 
WordPress Multisite
WordPress MultisiteWordPress Multisite
WordPress Multisite
 
WordPress for Beginners
WordPress for BeginnersWordPress for Beginners
WordPress for Beginners
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
Surviving the Zombie Apocalypse using Custom Post Types and Taxonomies
Surviving the Zombie Apocalypse using Custom Post Types and TaxonomiesSurviving the Zombie Apocalypse using Custom Post Types and Taxonomies
Surviving the Zombie Apocalypse using Custom Post Types and Taxonomies
 
Spooky WordPress: Disturbingly Brilliant Uses of WP
Spooky WordPress: Disturbingly Brilliant Uses of WPSpooky WordPress: Disturbingly Brilliant Uses of WP
Spooky WordPress: Disturbingly Brilliant Uses of WP
 
Custom Post Types and Taxonomies in WordPress
Custom Post Types and Taxonomies in WordPressCustom Post Types and Taxonomies in WordPress
Custom Post Types and Taxonomies in WordPress
 
Top 20 WordPress Plugins You've Never Heard Of
Top 20 WordPress Plugins You've Never Heard OfTop 20 WordPress Plugins You've Never Heard Of
Top 20 WordPress Plugins You've Never Heard Of
 
Website Design Dos and Don’ts for a Successful Online Presence
Website Design Dos and Don’ts  for a Successful Online PresenceWebsite Design Dos and Don’ts  for a Successful Online Presence
Website Design Dos and Don’ts for a Successful Online Presence
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Advanced Thesis Techniques and Tricks

  • 1. Advanced Thesis Techniques and Tricks Brad Williams WebDevStudios.com
  • 2. Brad Williams CEO & Co-Founder, WebDevStudios.com Co-Host SitePoint Podcast Organizer NJ WordPress Meetup Who Am I? Recent Thesis Sites: AwayToGarden.com (WPMU) LoomisCreek.com TheSisterProject.com (WPMU) MattBites.com RetroRenovation.com
  • 3.
  • 5.
  • 6.
  • 7.
  • 8. What is a Hook?
  • 9. What is a Hook?
  • 10. Thesis features a simple hook system that is essentially an API—a set of basic commands that you can use to add to, subtract from, and modify the functionality of your Thesis installation. Two step process: 1. construct a simple function to house your custom code 2. Tell Thesis where to place your custom code by specifying the appropriate hook You can add and remove any functions using add_action() and remove_action()
  • 11. Available Thesis Hooks thesis_hook_before_html thesis_hook_after_html thesis_hook_before_header thesis_hook_after_header thesis_hook_header thesis_hook_before_title thesis_hook_after_title thesis_hook_before_content_box thesis_hook_after_content_box thesis_hook_before_content thesis_hook_after_content thesis_hook_feature_box thesis_hook_before_post_box thesis_hook_after_post_box thesis_hook_before_teasers_box thesis_hook_after_teasers_box thesis_hook_before_post thesis_hook_after_post thesis_hook_before_teaser_box thesis_hook_after_teaser_box thesis_hook_before_teaser thesis_hook_after_teaser thesis_hook_before_headline thesis_hook_after_headline thesis_hook_before_teaser_headline thesis_hook_after_teaser_headline thesis_hook_byline_item thesis_hook_before_comment_meta thesis_hook_after_comment_meta thesis_hook_after_comment thesis_hook_comment_form thesis_hook_archives_template thesis_hook_custom_template thesis_hook_faux_admin thesis_hook_archive_info thesis_hook_404_title thesis_hook_404_content thesis_hook_before_sidebars thesis_hook_after_sidebars thesis_hook_multimedia_box thesis_hook_after_multimedia_box thesis_hook_before_sidebar_1 thesis_hook_after_sidebar_1 thesis_hook_before_sidebar_2 thesis_hook_after_sidebar_2 thesis_hook_before_footer thesis_hook_after_footer thesis_hook_footer
  • 12. 48 Hooks (In case you were counting)
  • 13. Example 1: Hello WordCamp <?php add_action('hook_name', ‘hello_wordcamp'); Function hello_wordcamp() { echo “Hello WordCamp!”; } ?>
  • 14. Example 2: Custom Footer <?php remove_action('thesis_hook_footer', 'thesis_attribution'); add_action('thesis_hook_footer', 'my_footer'); function my_footer() {     echo “<p>Copyright &copy; WebDevStudios.com</p>“; } ?>
  • 15. Now for the fun stuff
  • 16. Example 3: Custom Page Template <?php remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample'); add_action('thesis_hook_custom_template', 'home_custom'); ?> Remember to set the page template to Custom Template
  • 17. Example 4: Add A Secondary Menu Thesis by default has a single menu So lets create a secondary menu!
  • 18. Example 4: Add A Secondary Menu <?php function topnav_menu() { ?> <ul id=&quot;topnav&quot;> <li><a href=“/wordpress&quot;>WordPress</a></li> <li><a href=“/wpmu&quot;>WPMU</a></li> <li><a href=“/buddypress”>BuddyPress</a></li> <li><a href=“/bbpress&quot;>bbPress</a></li> </ul> <?php } add_action('thesis_hook_before_header', 'topnav_menu'); ?>
  • 19. Example 4: Add A Secondary Menu /* Top Nav bar */ .custom ul#topnav { border-style: none; list-style-image: none; list-style-position: outside; list-style-type: none; background:#E4E4E4 none repeat scroll 0 0; width: 100%; float: left; } .custom ul#topnav li { float: left; padding: 3px 10px 3px 0px; } .custom ul#topnav li a { font-size: 1.1em; color: #000000; } .custom ul#topnav li a:hover { text-decoration: underline; } Add a little styling in custom.css
  • 20. Example 4: Add A Secondary Menu BAM! Another menu! Ref: http://www.emptycabinmedia.com/thesis-theme-add-another-menu/
  • 21. Example 5: Widgetize your Multimedia Box
  • 22. Example 5: Widgetize your Multimedia Box <?php register_sidebar(array('name' => 'Multimedia Box', 'before_widget' => '<li class=&quot;widget %2$s&quot;>', 'after_widget' => '</li>', 'before_title' => '<h3>', 'after_title' => '</h3>')); function multimedia_box_widgets() { echo '<ul class=&quot;sidebar_list&quot;>'; dynamic_sidebar('Multimedia Box'); echo '</ul>'; } add_action('thesis_hook_multimedia_box', 'multimedia_box_widgets'); ?>
  • 23. Example 5: Widgetize your Multimedia Box Change the Multimedia Box setting to Custom code Add any widgets you want to the Multimedia Box sidebar
  • 24. Example 5: Widgetize your Multimedia Box Now we are widgetized! Ref: http://rickbeckman.org/widgetizing-thesis-multimedia-box/
  • 25. And there is no more, I lied In Summary, Thesis is a great theme for beginner and advanced users alike.
  • 26.
  • 27. Brad Williams [email_address] Blog: strangework.com twitter.com/williamsba IRC: WDS-Brad Everywhere else: williamsba Contact